Refactor system tests to live together in one package.

This commit is contained in:
Andrey Smirnov
2014-01-21 12:15:28 +04:00
parent 0f902ee74b
commit 362cdbcd57
9 changed files with 60 additions and 35 deletions
+1
View File
@@ -0,0 +1 @@
ERROR: error loading config file /Users/smira/.aptly.conf: invalid character 's' looking for beginning of object key string
+20 -2
View File
@@ -1,15 +1,33 @@
"""
Test config file generation.
Test config file
"""
import os
from lib import BaseTest
class Test(BaseTest):
class CreateConfigTest(BaseTest):
"""
new file is generated if missing
"""
runCmd = "aptly"
checkedFile = os.path.join(os.environ["HOME"], ".aptly.conf")
check = BaseTest.check_file
gold_processor = BaseTest.expand_environ
prepare = BaseTest.prepare_remove_all
class BadConfigTest(BaseTest):
"""
broken config file
"""
runCmd = "aptly"
expectedCode = 1
def prepare(self):
self.prepare_remove_all()
f = open(os.path.join(os.environ["HOME"], ".aptly.conf"), "w")
f.write("{some crap")
f.close()