()
| 60 | def tearDownClass(cls): |
| 61 | if cls.mongodb_available: |
| 62 | async def cleanup(): |
| 63 | conn = MongoDBConnection() |
| 64 | db = await conn.get_db() |
| 65 | |
| 66 | test_collections = [ |
| 67 | "test_xhs_contents", |
| 68 | "test_xhs_comments", |
| 69 | "test_xhs_creators", |
| 70 | "test_douyin_contents", |
| 71 | "test_douyin_comments", |
| 72 | "test_douyin_creators" |
| 73 | ] |
| 74 | |
| 75 | for collection_name in test_collections: |
| 76 | try: |
| 77 | await db[collection_name].drop() |
| 78 | except: |
| 79 | pass |
| 80 | |
| 81 | await conn.close() |
| 82 | |
| 83 | try: |
| 84 | asyncio.run(cleanup()) |
nothing calls this directly
no test coverage detected