I trying to test __str__ method, and when trying to access it in my test it returns my model instance (I think it is)
def test_str_is_equal_to_title(self): \
According to the documentation:
Model.__str__() The __str__() method is called whenever you call str() on an object.
Model.__str__()
The __str__() method is called whenever you call str() on an object.
__str__()
str()
You need to call str() on the model instance:
self.assertEqual(str(work), work.title)
Alternatively, you may simply call it like:
model_instance.__str__()