lundi 27 août 2018

Does this test makes sense?

I'm currently learning how to write tests for a Django application. The guy in the tutorial video wrote the following test for his application:

def test_product_url(self):
    path = reverse('product_detail')
    self.assertEqual(resolve(path).view_name, 'product_detail')

I don't understand how this test makes sense. It just tests if the django resolve functions works correctly right?

Aucun commentaire:

Enregistrer un commentaire