lundi 25 février 2019

Check if a view function was called

I'd like to test if my JS timer runs my timeout view:

    def testTimeLimit(self):
      self.client.get('/')
      response = self.client.get('/new',follow = True)
      sleep(2)
      #Assertion that checks if timeout view was called

How could I check what view functions were called in a session in chronological order? I know this test is easy to do in selenium but is it possible with a django.test.TestCase?

Aucun commentaire:

Enregistrer un commentaire