7👍
✅
Look at the error message: name[0]
is a unicode string and Test.id
is a UUID. They have the same representation but are different objects. To test equality simply convert one object to the type of the other:
self.assertEqual(name[0], str(Test.id))
Source:stackexchange.com