@@ -265,8 +265,20 @@ def test_contains_same_size(self):
265
265
#same, error_message = jsoncompare.contains(expected, actual)
266
266
#assert same, error_message
267
267
268
- # Test two json that are same size but values do not match
268
+ # Test two json that are same size and keys/ values match with ignore_order
269
269
def test_contains_same_size2 (self ):
270
+ actual = [
271
+ {"wtf" : "omg" },
272
+ {"wtf1" : "omg1" }
273
+ ]
274
+ expected = [
275
+ {"wtf" : "omg" },
276
+ {"wtf1" : "omg1" }
277
+ ]
278
+ self .assertTrue (jsoncompare .contains (expected , actual , True )[0 ])
279
+
280
+ # Test two json that are same size but values do not match
281
+ def test_contains_same_size3 (self ):
270
282
actual = [
271
283
{"wtf" : "omg" },
272
284
{"wtf1" : "omg1" }
@@ -280,7 +292,7 @@ def test_contains_same_size2(self):
280
292
#assert same, error_message
281
293
282
294
# Test two json that are same size but keys do not match
283
- def test_contains_same_size3 (self ):
295
+ def test_contains_same_size4 (self ):
284
296
actual = [
285
297
{"wtf" : "omg" },
286
298
{"wtf1" : "omg1" }
@@ -290,8 +302,8 @@ def test_contains_same_size3(self):
290
302
{"wtf999" : "omg1" }
291
303
]
292
304
self .assertFalse (jsoncompare .contains (expected , actual )[0 ])
293
- same , error_message = jsoncompare .contains (expected , actual )
294
- assert same , error_message
305
+ # same, error_message = jsoncompare.contains(expected, actual)
306
+ # assert same, error_message
295
307
296
308
# Test two json where Actual is larger - it can (potentialy) contain all of the expected attributes
297
309
def test_contains_actual_bigger (self ):
0 commit comments