1 """ Send junk to the collector """
3 from sqlite3 import connect
7 from .common import send_and_drain, TestWithServers
8 from loctrkd import ocid_dload
11 class Ocid_Dload(TestWithServers):
12 def setUp(self, *args: str, **kwargs: Any) -> None:
13 super().setUp(httpd=True)
15 def tearDown(self) -> None:
16 sleep(1) # give collector some time
19 def test_ocid_dload(self) -> None:
20 ocid_dload.main(self.conf)
21 with connect(self.conf.get("opencellid", "dbfn")) as db:
22 (count,) = db.execute("select count(*) from cells").fetchone()
23 self.assertEqual(count, 163)
26 if __name__ == "__main__":