routes.py 434 B

1234567891011121314151617181920
  1. import lc.config as c
  2. import lc.model as m
  3. import lc.app as a
  4. class TestRoutes:
  5. def setup_method(self, _):
  6. c.db.init(":memory:")
  7. c.db.create_tables(m.MODELS)
  8. self.app = a.app.test_client()
  9. def teardown_method(self, _):
  10. c.db.close()
  11. def get(self, path):
  12. return self.app.get(path)
  13. def test_index(self):
  14. result = self.get("/")
  15. assert result.status == "200 OK"