示例#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)