예제 #1
0
파일: tests.py 프로젝트: naiyt/tarsnapgui
class TestArchives(unittest.TestCase):
	def setUp(self):
		name = 'tarsnapgui-test-{}'.format(int(time.time()))
		check_output('touch /home/nate/source/tarsnap/test.txt', shell=True)
		# TODO - replace this with a test for actually creating an archive
		check_output('tarsnap -c -f {} /home/nate/source/tarsnap/test.txt'.format(name), shell=True)
		self.archive = Archive(name)

	def tearDown(self):
		self.archive.delete()

	def test_archive_stats(self):
		self.archive.stats()

	def test_archive_listing_files(self):
		self.archive.list_files()
예제 #2
0
파일: tests.py 프로젝트: naiyt/tarsnapgui
	def setUp(self):
		name = 'tarsnapgui-test-{}'.format(int(time.time()))
		check_output('touch /home/nate/source/tarsnap/test.txt', shell=True)
		# TODO - replace this with a test for actually creating an archive
		check_output('tarsnap -c -f {} /home/nate/source/tarsnap/test.txt'.format(name), shell=True)
		self.archive = Archive(name)