def test_entity(self): """Entity attribute should have a value""" e = errors.AlreadyExistsError(element='task1') self.assertEqual(e.element, 'task1')
def test_message(self): """Make sure that prints the correct error""" e = errors.AlreadyExistsError(element='task1') self.assertEqual(str(e), 'task1 already exists')