I'm trying to get into TDD. Going by the book of Harry Percival I want to go in very small steps. So my first unit test should be to check if ...
found = resolve("/")
really calls the right function. So I do this assertion:
self.assertEqual(found.func, ListView.as_view())
But it tells me:
AssertionError: <function ListView at 0x3389668> != <function ListView at 0x35c1e60>
So why don't the functions match?
Aucun commentaire:
Enregistrer un commentaire