@@ -82,21 +82,21 @@ def test_replicate(self):
82
82
bname , b = self .temp_db ()
83
83
id , rev = a .save ({'test' : 'a' })
84
84
result = self .server .replicate (aname , bname )
85
- self .assertEquals (result ['ok' ], True )
86
- self .assertEquals (b [id ]['test' ], 'a' )
85
+ self .assertEqual (result ['ok' ], True )
86
+ self .assertEqual (b [id ]['test' ], 'a' )
87
87
88
88
doc = b [id ]
89
89
doc ['test' ] = 'b'
90
90
b .update ([doc ])
91
91
self .server .replicate (bname , aname )
92
- self .assertEquals (a [id ]['test' ], 'b' )
93
- self .assertEquals (b [id ]['test' ], 'b' )
92
+ self .assertEqual (a [id ]['test' ], 'b' )
93
+ self .assertEqual (b [id ]['test' ], 'b' )
94
94
95
95
def test_replicate_continuous (self ):
96
96
aname , a = self .temp_db ()
97
97
bname , b = self .temp_db ()
98
98
result = self .server .replicate (aname , bname , continuous = True )
99
- self .assertEquals (result ['ok' ], True )
99
+ self .assertEqual (result ['ok' ], True )
100
100
version = tuple (int (i ) for i in self .server .version ().split ('.' )[:2 ])
101
101
if version >= (0 , 10 ):
102
102
self .assertTrue ('_local_id' in result )
@@ -238,7 +238,7 @@ def test_attachment_crud(self):
238
238
old_rev = doc ['_rev' ]
239
239
240
240
self .db .put_attachment (doc , 'Foo bar' , 'foo.txt' , 'text/plain' )
241
- self .assertNotEquals (old_rev , doc ['_rev' ])
241
+ self .assertNotEqual (old_rev , doc ['_rev' ])
242
242
243
243
doc = self .db ['foo' ]
244
244
attachment = doc ['_attachments' ]['foo.txt' ]
@@ -252,7 +252,7 @@ def test_attachment_crud(self):
252
252
253
253
old_rev = doc ['_rev' ]
254
254
self .db .delete_attachment (doc , 'foo.txt' )
255
- self .assertNotEquals (old_rev , doc ['_rev' ])
255
+ self .assertNotEqual (old_rev , doc ['_rev' ])
256
256
self .assertEqual (None , self .db ['foo' ].get ('_attachments' ))
257
257
258
258
def test_attachment_crud_with_files (self ):
@@ -262,7 +262,7 @@ def test_attachment_crud_with_files(self):
262
262
fileobj = StringIO ('Foo bar baz' )
263
263
264
264
self .db .put_attachment (doc , fileobj , 'foo.txt' )
265
- self .assertNotEquals (old_rev , doc ['_rev' ])
265
+ self .assertNotEqual (old_rev , doc ['_rev' ])
266
266
267
267
doc = self .db ['foo' ]
268
268
attachment = doc ['_attachments' ]['foo.txt' ]
@@ -276,7 +276,7 @@ def test_attachment_crud_with_files(self):
276
276
277
277
old_rev = doc ['_rev' ]
278
278
self .db .delete_attachment (doc , 'foo.txt' )
279
- self .assertNotEquals (old_rev , doc ['_rev' ])
279
+ self .assertNotEqual (old_rev , doc ['_rev' ])
280
280
self .assertEqual (None , self .db ['foo' ].get ('_attachments' ))
281
281
282
282
def test_empty_attachment (self ):
@@ -285,7 +285,7 @@ def test_empty_attachment(self):
285
285
old_rev = doc ['_rev' ]
286
286
287
287
self .db .put_attachment (doc , '' , 'empty.txt' )
288
- self .assertNotEquals (old_rev , doc ['_rev' ])
288
+ self .assertNotEqual (old_rev , doc ['_rev' ])
289
289
290
290
doc = self .db ['foo' ]
291
291
attachment = doc ['_attachments' ]['empty.txt' ]
@@ -320,7 +320,7 @@ def test_json_attachment(self):
320
320
doc = {}
321
321
self .db ['foo' ] = doc
322
322
self .db .put_attachment (doc , '{}' , 'test.json' , 'application/json' )
323
- self .assertEquals (self .db .get_attachment (doc , 'test.json' ).read (), '{}' )
323
+ self .assertEqual (self .db .get_attachment (doc , 'test.json' ).read (), '{}' )
324
324
325
325
def test_include_docs (self ):
326
326
doc = {'foo' : 42 , 'bar' : 40 }
@@ -587,12 +587,12 @@ def reduce_fun(keys, values):
587
587
def test_init_with_resource (self ):
588
588
self .db ['foo' ] = {}
589
589
view = client .PermanentView (self .db .resource ('_all_docs' ).url , '_all_docs' )
590
- self .assertEquals (len (list (view ())), 1 )
590
+ self .assertEqual (len (list (view ())), 1 )
591
591
592
592
def test_iter_view (self ):
593
593
self .db ['foo' ] = {}
594
594
view = client .PermanentView (self .db .resource ('_all_docs' ).url , '_all_docs' )
595
- self .assertEquals (len (list (view )), 1 )
595
+ self .assertEqual (len (list (view )), 1 )
596
596
597
597
def test_tmpview_repr (self ):
598
598
mapfunc = "function(doc) {emit(null, null);}"
0 commit comments