summaryrefslogtreecommitdiffstats
path: root/layman/tests
diff options
context:
space:
mode:
authordol-sen <brian.dolbec@gmail.com>2011-07-22 23:43:29 -0700
committerdol-sen <brian.dolbec@gmail.com>2011-07-22 23:43:29 -0700
commit7fa3a45f35d8571e384f8648aed49384de0d8a4d (patch)
tree8bf77cdba537fb13d0a7a807169de5eaf7818f30 /layman/tests
parent76631892e26c1f08d3a00232e58f454acda09fef (diff)
downloadlayman-7fa3a45f35d8571e384f8648aed49384de0d8a4d.tar.gz
layman-7fa3a45f35d8571e384f8648aed49384de0d8a4d.tar.bz2
layman-7fa3a45f35d8571e384f8648aed49384de0d8a4d.zip
update all tests to pass
Diffstat (limited to 'layman/tests')
-rwxr-xr-xlayman/tests/dtest.py1
-rwxr-xr-xlayman/tests/external.py18
2 files changed, 12 insertions, 7 deletions
diff --git a/layman/tests/dtest.py b/layman/tests/dtest.py
index 15e0900..4bf3437 100755
--- a/layman/tests/dtest.py
+++ b/layman/tests/dtest.py
@@ -69,6 +69,7 @@ def test_suite():
return unittest.TestSuite((
#doctest.DocTestSuite(layman.api),
doctest.DocTestSuite(layman.config),
+ doctest.DocTestSuite(layman.argsparser),
doctest.DocTestSuite(layman.db),
doctest.DocTestSuite(layman.dbbase),
doctest.DocTestSuite(layman.utils),
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 3c23373..e5e8c4e 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -21,6 +21,8 @@ import tempfile
import shutil
import urllib
from layman.dbbase import DbBase
+from layman.output import Message
+from layman.config import BareConfig
from warnings import filterwarnings, resetwarnings
HERE = os.path.dirname(os.path.realpath(__file__))
@@ -28,9 +30,9 @@ HERE = os.path.dirname(os.path.realpath(__file__))
class Unicode(unittest.TestCase):
def _overlays_bug(self, number):
- config = {}
+ config = BareConfig()
filename = os.path.join(HERE, 'testfiles', 'overlays_bug_%d.xml' % number)
- o = DbBase([filename], config)
+ o = DbBase(config, [filename])
for verbose in (True, False):
for t in o.list(verbose=verbose):
print t[0]
@@ -45,15 +47,16 @@ class Unicode(unittest.TestCase):
class FormatSubpathCategory(unittest.TestCase):
def _run(self, number):
- config = {}
+ #config = {'output': Message()}
+ config = BareConfig()
filename1 = os.path.join(HERE, 'testfiles',
'subpath-%d.xml' % number)
# Read, write, re-read, compare
- os1 = DbBase([filename1], config)
+ os1 = DbBase(config, [filename1])
filename2 = os.tmpnam()
os1.write(filename2)
- os2 = DbBase([filename2], config)
+ os2 = DbBase(config, [filename2])
os.unlink(filename2)
self.assertTrue(os1 == os2)
@@ -103,8 +106,9 @@ class TarAddRemoveSync(unittest.TestCase):
temp_dir_path = tempfile.mkdtemp()
# Make DB from it
- config = {'tar_command':'/bin/tar'}
- db = DbBase([temp_collection_path], config)
+ #config = {'output': Message(), 'tar_command':'/bin/tar'}
+ config = BareConfig()
+ db = DbBase(config, [temp_collection_path])
specific_overlay_path = os.path.join(temp_dir_path, repo_name)
o = db.select('tar-test-overlay')