Exemplo n.º 1
0
 def test_db_print_file(self):
     dropbox_file, lines_string = self.create_test_dropbox_file(5, self.id())
     capture_stdio(True)
     DT.db_print_file(dropbox_file)
     self.assertStdoutContains('\n'.split(lines_string))
     capture_stdio(False)
     DT.db_delete_file(dropbox_file)
Exemplo n.º 2
0
 def test_db_list_directory(self):
     dropbox_file, lines_string = self.create_test_dropbox_file(4, self.id())
     capture_stdio(True)
     DT.db_list_directory()
     self.assertStdoutContains(dropbox_file[1:]) # remove leading '/'
     capture_stdio(False)
     DT.db_delete_file(dropbox_file)
Exemplo n.º 3
0
 def test_db_print_file(self):
     dropbox_file, lines_string = self.create_test_dropbox_file(
         5, self.id())
     capture_stdio(True)
     DT.db_print_file(dropbox_file)
     self.assertStdoutContains('\n'.split(lines_string))
     capture_stdio(False)
     DT.db_delete_file(dropbox_file)
Exemplo n.º 4
0
 def test_db_list_directory(self):
     dropbox_file, lines_string = self.create_test_dropbox_file(
         4, self.id())
     capture_stdio(True)
     DT.db_list_directory()
     self.assertStdoutContains(dropbox_file[1:])  # remove leading '/'
     capture_stdio(False)
     DT.db_delete_file(dropbox_file)
Exemplo n.º 5
0
 def test_db_create_text_file(self):
     dropbox_file, lines_string = self.create_test_dropbox_file(
         6, self.id())
     self.assertDbFileContentsEqual(dropbox_file, lines_string)
     DT.db_delete_file(dropbox_file)
Exemplo n.º 6
0
 def test_db_delete_file(self):
     dropbox_file, lines_string = self.create_test_dropbox_file(
         7, self.id())
     DT.db_delete_file(dropbox_file)
     self.assertDbFileHasBeenDeleted(dropbox_file)
Exemplo n.º 7
0
 def test_db_delete_file(self):
     dropbox_file, lines_string = self.create_test_dropbox_file(7, self.id())
     DT.db_delete_file(dropbox_file)
     self.assertDbFileHasBeenDeleted(dropbox_file)
Exemplo n.º 8
0
 def test_db_create_text_file(self):
     dropbox_file, lines_string = self.create_test_dropbox_file(6, self.id())
     self.assertDbFileContentsEqual(dropbox_file, lines_string)
     DT.db_delete_file(dropbox_file)