Beispiel #1
0
 def test_update_collected_domains_state(self):
     dmns = [
         Domain("https://nytimes.com"),
         Domain("https://twitter.com"),
         Domain("https://noidea.com")
     ]
     sqlite = SQLite("../../Storage/localdb.db")
     sqlite.update_collected_domains(dmns)
     sqlite.close()
Beispiel #2
0
 def test_sqlite_init(self):
     sqlite = SQLite("../../Storage/localdb.db")
     self.assertNotEqual(sqlite.connexion, None,
                         "FAILED CRFEATING SQLITE CONNEXION")
     sqlite.close()
     self.assertEqual(sqlite.connexion, None, "FAILED CLOSING DB")
Beispiel #3
0
 def test_select_rss_channels(self):
     sqlite = SQLite("../../Storage/localdb.db")
     print(sqlite.select_rss_channels())
     sqlite.close()
Beispiel #4
0
 def test_select_domains(self):
     sqlite = SQLite("../../Storage/localdb.db")
     print(sqlite.select_collected_domains(state=2))
     sqlite.close()
Beispiel #5
0
 def test_insert_rss_channels_links(self):
     rch = RssChannel("hellodomain", "domain_test")
     sqlite = SQLite("../../Storage/localdb.db")
     sqlite.insert_rss_channels([rch])
     sqlite.close()
Beispiel #6
0
 def test_insert_domains(self):
     d = Domain("domain_test")
     sqlite = SQLite("../../Storage/localdb.db")
     sqlite.insert_collected_domains([d])
     sqlite.close()