def setUp(self): self.app = create_app(TestConfig) self.client = self.app.test_client()
def test_page_should_show_when_feature_is_enabled(self): app = create_app(HeadConfig) client = app.test_client() resp = client.get('/') self.assertEqual(resp.status_code, 200)
def liveup(): """Start the server up using StableConfig """ from planner import config, create_app create_app(config.StableConfig).run()
def test_page_should_be_hidden_when_feature_disabled(self): app = create_app(StableConfig) client = app.test_client() resp = client.get('/') self.assertEqual(resp.status_code, 404)
def devup(): """Start the server using HeadConfig """ from planner import config, create_app create_app(config.HeadConfig).run(debug=True)