Esempio n. 1
0
from src.python.ws.app import create_app

app = create_app(config_filename="src.python.ws.conf.DevelopmentConfig")

if __name__ == "__main__":
    app.run()
Esempio n. 2
0
 def test_if_fake_path_does_not_exist(self):
     """Test if fake path is not reachable."""
     tester = create_app().test_client(self)
     response = tester.get("/fake_path", content_type="html/text")
     self.assertEqual(response.status_code, NOT_FOUND_STATUS_CODE)
Esempio n. 3
0
 def test_if_root_path_exists(self):
     """Test if homepage is reachable."""
     tester = create_app().test_client(self)
     response = tester.get("/", content_type="html/text")
     self.assertEqual(response.status_code, SUCCESS_STATUS_CODE)
Esempio n. 4
0
def test_if_default_conf_is_set():
    """Test default config."""
    app = create_app()
    assert app.config.get("DEBUG") is False
Esempio n. 5
0
def test_if_test_conf_is_set():
    """Test testing config."""
    app = create_app("src.python.ws.conf.TestingConfig")
    assert app.config.get("TESTING") is True
Esempio n. 6
0
def test_if_development_conf_is_set():
    """Test development config."""
    app = create_app("src.python.ws.conf.DevelopmentConfig")
    assert app.config.get("DEBUG") is True