MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / asyncSetUp

Method asyncSetUp

tests/test_daily_stats_reset.py:9–20  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7
8class DailyStatsResetTests(unittest.IsolatedAsyncioTestCase):
9 async def asyncSetUp(self):
10 self._temp_dir = tempfile.TemporaryDirectory()
11 self.db = Database(db_path=f"{self._temp_dir.name}/flow.db")
12 await self.db.init_db()
13 self.token_id = await self.db.add_token(
14 Token(
15 st="st-test",
16 at="at-test",
17 email="tester@example.com",
18 name="tester",
19 )
20 )
21
22 async def asyncTearDown(self):
23 self._temp_dir.cleanup()

Callers

nothing calls this directly

Calls 4

DatabaseClass · 0.90
TokenClass · 0.90
init_dbMethod · 0.80
add_tokenMethod · 0.45

Tested by

no test coverage detected