Exemple #1
0
    def setup_class(cls):
        """ Setup for this test case"""

        # Create the test client
        cls.client = app.test_client()

        cls.payload = {'name': 'Harry', 'tags': [1, 2]}
Exemple #2
0
def test_flask_view():
    """ Test that non Protean views work as before """
    # Create the test client
    client = app.test_client()

    rv = client.get('/flask-view')
    assert rv.status_code == 200
    assert rv.data == b'View Response'

    rv = client.get('/flask-view/abc')
    assert rv.status_code == 404
Exemple #3
0
 def client(self):
     """ Setup client for test cases """
     yield app.test_client()
    def setup_class(cls):
        """ Setup for this test case"""

        # Create the test client
        cls.client = app.test_client()