def test_forwards_description(self): x = Mismatch("description", {'foo': 'bar'}) decorated = MismatchDecorator(x) self.assertEqual(x.describe(), decorated.describe())
def test_constructor_arguments(self): mismatch = Mismatch("some description", {'detail': "things"}) self.assertEqual("some description", mismatch.describe()) self.assertEqual({'detail': "things"}, mismatch.get_details())