@@ -49,6 +49,7 @@ def testref(update_rules):
49
49
Returns:
50
50
Reference: A reference to the test dinosaur database.
51
51
"""
52
+ del update_rules
52
53
ref = db .reference ('_adminsdk/python/dinodb' )
53
54
ref .set (testdata ())
54
55
return ref
@@ -138,10 +139,15 @@ def test_update_children_with_existing_values(self, testref):
138
139
139
140
def test_update_nested_children (self , testref ):
140
141
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 }
145
151
146
152
def test_delete (self , testref ):
147
153
python = testref .parent
@@ -233,6 +239,7 @@ def test_filter_by_value(self, testref):
233
239
234
240
@pytest .fixture (scope = 'module' )
235
241
def override_app (request , update_rules ):
242
+ del update_rules
236
243
cred , project_id = conftest .integration_conf (request )
237
244
ops = {
238
245
'databaseURL' : 'https://{0}.firebaseio.com' .format (project_id ),
@@ -244,6 +251,7 @@ def override_app(request, update_rules):
244
251
245
252
@pytest .fixture (scope = 'module' )
246
253
def none_override_app (request , update_rules ):
254
+ del update_rules
247
255
cred , project_id = conftest .integration_conf (request )
248
256
ops = {
249
257
'databaseURL' : 'https://{0}.firebaseio.com' .format (project_id ),
0 commit comments