Skip to content

Instantly share code, notes, and snippets.

@heavenshell
Created January 16, 2013 11:40
Show Gist options
  • Save heavenshell/4546571 to your computer and use it in GitHub Desktop.
Save heavenshell/4546571 to your computer and use it in GitHub Desktop.
Werkzeug test client
# -*- coding: utf-8 -*-
from unittest import TestCase
from werkzeug.test import Client
from werkzeug.wrappers import BaseResponse
from app import create_app
class TestClient(TestCase):
def test_root(self):
c = Client(create_app(), BaseResponse)
resp = c.get('/')
self.assertEqual(resp.status_code, 200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment