예제 #1
0
    def test_homepage(self):
        """
        Tests whether the '/' endpoint works properly.
        Fails if it does not succesfully display the homepage.
        """

        test_client = app.test_client()
        result = test_client.get('/')
        self.assertEqual(result.status_code, 200)
예제 #2
0
    def test_client_key(self):
        """
        Tests whether the '/client-key' endpoint works properly.
        Fails if incorrect or no secret key is found.
        """

        test_client = app.test_client()
        result = test_client.get('/client-key/1234')
        self.assertEqual(result.status_code, 200)