@@ -49,6 +49,7 @@ def testref(update_rules):
4949 Returns:
5050 Reference: A reference to the test dinosaur database.
5151 """
52+ del update_rules
5253 ref = db .reference ('_adminsdk/python/dinodb' )
5354 ref .set (testdata ())
5455 return ref
@@ -138,10 +139,15 @@ def test_update_children_with_existing_values(self, testref):
138139
139140 def test_update_nested_children (self , testref ):
140141 python = testref .parent
141- ref = python .child ('users' ).push ({'name' : 'Edward Cope' , 'since' : 1800 })
142- nested_key = '{0}/since' .format (ref .key )
143- python .child ('users' ).update ({nested_key : 1840 })
144- assert ref .get () == {'name' : 'Edward Cope' , 'since' : 1840 }
142+ edward = python .child ('users' ).push ({'name' : 'Edward Cope' , 'since' : 1800 })
143+ jack = python .child ('users' ).push ({'name' : 'Jack Horner' , 'since' : 1940 })
144+ delta = {
145+ '{0}/since' .format (edward .key ) : 1840 ,
146+ '{0}/since' .format (jack .key ) : 1946
147+ }
148+ python .child ('users' ).update (delta )
149+ assert edward .get () == {'name' : 'Edward Cope' , 'since' : 1840 }
150+ assert jack .get () == {'name' : 'Jack Horner' , 'since' : 1946 }
145151
146152 def test_delete (self , testref ):
147153 python = testref .parent
@@ -233,6 +239,7 @@ def test_filter_by_value(self, testref):
233239
234240@pytest .fixture (scope = 'module' )
235241def override_app (request , update_rules ):
242+ del update_rules
236243 cred , project_id = conftest .integration_conf (request )
237244 ops = {
238245 'databaseURL' : 'https://{0}.firebaseio.com' .format (project_id ),
@@ -244,6 +251,7 @@ def override_app(request, update_rules):
244251
245252@pytest .fixture (scope = 'module' )
246253def none_override_app (request , update_rules ):
254+ del update_rules
247255 cred , project_id = conftest .integration_conf (request )
248256 ops = {
249257 'databaseURL' : 'https://{0}.firebaseio.com' .format (project_id ),
0 commit comments