def test_message_on_fail(self): superset = {'one': 1, 'two': 2, 'three': 3} subset = {'one': 2, 'two': 2} expected = "expected [subset has:{'one': 2}, superset has:{'one': 1}]" try: assert_dict_subset(subset, superset) except AssertionError, e: assert_equal(expected, e.args[0])
def test_message_on_fail(self): superset = {'one': 1, 'two': 2, 'three': 3} subset = {'one': 2, 'two':2} expected = "expected [subset has:{'one': 2}, superset has:{'one': 1}]" try: assert_dict_subset(subset, superset) except AssertionError, e: assert_equal(expected, e.args[0])
def test_message_on_fail(self): superset = {'one': 1, 'two': 2, 'three': 3} subset = {'one': 2, 'two': 2} expected = "expected [subset has:{'one': 2}, superset has:{'one': 1}]" try: assert_dict_subset(subset, superset) except AssertionError as e: assert_equal(expected, e.args[0]) else: assert_not_reached('AssertionError should have been raised')
def test_message_on_fail(self): superset = {'one': 1, 'two': 2, 'three': 3} subset = {'one': 2, 'two':2} expected = "expected [subset has:{'one': 2}, superset has:{'one': 1}]" try: assert_dict_subset(subset, superset) except AssertionError as e: assert_equal(expected, e.args[0]) else: assert_not_reached('AssertionError should have been raised')
def test_passes_with_subset(self): superset = {'one': 1, 'two': 2, 'three': 3} subset = {'one': 1} assert_dict_subset(subset, superset)