pass
def insert_btclients(self, client_name, language, dht, streaming):
- insert_btclients_row([client_name, language, dht, streaming])
+ self.insert_btclients_row([client_name, language, dht, streaming])
def select_btclients(self, show=True, id=-1):
pass
self.assertEqual(id, 1)
def test_insert_btclients_row(self):
- # TODO
- self.assertEqual(True, True)
+ self.dba.insert_btclients_row(['NextShare', 'Python', 1, 0]);
+ self.dba.select_btclients(False)
+
+ num_rows = 0
+ for row in self.cursor:
+ num_rows = num_rows+1
+
+ self.assertEqual(num_rows, 7)
def test_insert_btclients(self):
- # TODO
- self.assertEqual(True, True)
+ self.dba.insert_btclients('NextShare', 'Python', 1, 0);
+ self.dba.select_btclients(False)
+
+ num_rows = 0
+ for row in self.cursor:
+ num_rows = num_rows+1
+
+ self.assertEqual(num_rows, 7)
def test_select_client_sessions_by_id(self):
# TODO: An entry should be added in the startup script.
self.assertEqual(num_rows, 1)
-
def test_delete_verbose_messages(self):
self.dba.insert_swarms("fedora.torrent", 10000, "btex", "isohunt")
self.dba.insert_client_sessions_row(['1', '2', 'Linux', '2.6.26', '512', '1500', '141.85.224.205', '50500', '512', '64', '2455125.02409722'])