def test_contains_same_size4(self): actual = [ {"wtf": "omg"}, {"wtf1": "omg1"} ] expected = [ {"wtf": "omg"}, {"wtf999": "omg1"} ] self.assertFalse(jsoncompare.contains(expected, actual)[0])
def test_contains_same_size2(self): actual = [ {"wtf": "omg"}, {"wtf1": "omg1"} ] expected = [ {"wtf": "omg"}, {"wtf1": "omg1"} ] self.assertTrue(jsoncompare.contains(expected, actual, True)[0])
def test_contains_actual_smaller(self): actual = [ {"wtf": "omg"}, {"wtf1": "omg1"} ] expected = [ {"wtf": "omg"}, {"wtf1": "omg1"}, {"wtf2": "omg2"} ] self.assertFalse(jsoncompare.contains(expected, actual)[0])
def test_contains_actual_bigger(self): actual = [ {"wtf": "omg"}, {"wtf1": "omg1"}, {"wtf3": "omg3"} ] expected = [ {"wtf": "omg"}, {"wtf1": "omg1"} ] self.assertTrue(jsoncompare.contains(expected, actual)[0])
def test_not_contains_nested_in_array_in_object(self): actual = { "outer": [ {"inner": {"a": 1}} ] } expected = { "outer": [ {"inner": {"a": 1, "b": 2}} ] } self.assertFalse(jsoncompare.contains(expected, actual)[0])
def test_contains_nested_in_array(self): actual = { "inner": [ {"a": 1, "b": 2} ] } expected = { "inner": [ {"a": 1} ] } self.assertTrue(jsoncompare.contains(expected, actual)[0])
def test_contains_actual_smaller_nested(self): actual = { "inner": [ {"wtf": "omg"}, {"wtf1": "omg1"} ] } expected = { "inner": [ {"wtf": "omg"}, {"wtf1": "omg1"}, {"wtf2": "omg2"} ] } self.assertFalse(jsoncompare.contains(expected, actual)[0])
def test_contains_actual_bigger_nested(self): actual = { "inner": [ {"wtf": "omg"}, {"wtf1": "omg1"}, {"wtf3": "omg3"} ] } expected = { "inner": [ {"wtf": "omg"}, {"wtf1": "omg1"} ] } self.assertTrue(jsoncompare.contains(expected, actual)[0])
def test_contains_actual_smaller(self): actual = [{"wtf": "omg"}, {"wtf1": "omg1"}] expected = [{"wtf": "omg"}, {"wtf1": "omg1"}, {"wtf2": "omg2"}] self.assertFalse(jsoncompare.contains(expected, actual)[0])
def test_contains_actual_bigger(self): actual = [{"wtf": "omg"}, {"wtf1": "omg1"}, {"wtf3": "omg3"}] expected = [{"wtf": "omg"}, {"wtf1": "omg1"}] self.assertTrue(jsoncompare.contains(expected, actual)[0])
def test_contains_same_size4(self): actual = [{"wtf": "omg"}, {"wtf1": "omg1"}] expected = [{"wtf": "omg"}, {"wtf999": "omg1"}] self.assertFalse(jsoncompare.contains(expected, actual)[0])
def test_contains_same_size2(self): actual = [{"wtf": "omg"}, {"wtf1": "omg1"}] expected = [{"wtf": "omg"}, {"wtf1": "omg1"}] self.assertTrue(jsoncompare.contains(expected, actual, True)[0])