aboutsummaryrefslogtreecommitdiff
path: root/layman
diff options
context:
space:
mode:
authorDevan Franchini <twitch153@gentoo.org>2015-07-14 09:30:16 -0400
committerDevan Franchini <twitch153@gentoo.org>2015-07-14 09:30:37 -0400
commit7428f47c435073a929f9a41f72a6bd8a675b631e (patch)
treec873ab23f08300646095ccb4e73593570bb8ee4a /layman
parentlayman.cfg: Changes description of db_type to warn user of limitation (diff)
downloadlayman-7428f47c435073a929f9a41f72a6bd8a675b631e.tar.gz
layman-7428f47c435073a929f9a41f72a6bd8a675b631e.tar.bz2
layman-7428f47c435073a929f9a41f72a6bd8a675b631e.zip
external.py: Adds db_type config option to tests which need it
The Overlay, DbBase, and DB would require the db_type config option to be set. To prevent it from falling back on config option defaults it's best to specify it.
Diffstat (limited to 'layman')
-rwxr-xr-xlayman/tests/external.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 0dad278..3e41bd1 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -154,6 +154,7 @@ class AddDeleteDB(unittest.TestCase):
my_opts = {'installed' : temp_xml_path,
'conf_type' : ['make.conf', 'repos.conf'],
+ 'db_type' : 'xml_db',
'nocheck' : 'yes',
'make_conf' : make_conf,
'repos_conf' : repo_conf,
@@ -480,6 +481,7 @@ class FormatBranchCategory(unittest.TestCase):
def _run(self, number):
#config = {'output': Message()}
config = BareConfig()
+
# Discuss renaming files to "branch-%d.xml"
filename1 = os.path.join(HERE, 'testfiles',
'subpath-%d.xml' % number)
@@ -554,7 +556,7 @@ class OverlayObjTest(unittest.TestCase):
overlays = document.findall('overlay') + document.findall('repo')
output = Message()
- ovl_a = Overlay({'output': output}, overlays[0])
+ ovl_a = Overlay({'output': output, 'db_type': 'xml_db'}, xml=overlays[0])
self.assertEqual(ovl_a.name, 'wrobel')
self.assertEqual(ovl_a.is_official(), True)
url = ['https://overlays.gentoo.org/svn/dev/wrobel']
@@ -563,7 +565,7 @@ class OverlayObjTest(unittest.TestCase):
self.assertEqual(ovl_a.descriptions, ['Test'])
self.assertEqual(ovl_a.priority, 10)
- ovl_b = Overlay({'output': output}, overlays[1])
+ ovl_b = Overlay({'output': output, 'db_type': 'xml_db'}, xml=overlays[1])
self.assertEqual(ovl_b.is_official(), False)
@@ -572,7 +574,7 @@ class OverlayObjTest(unittest.TestCase):
overlays = document.findall('overlay') + document.findall('repo')
output = Message()
- ovl = Overlay({'output': output}, overlays[0])
+ ovl = Overlay({'output': output, 'db_type': 'xml_db'}, xml=overlays[0])
test_infostr = 'wrobel\n~~~~~~\nSource : '\
'https://overlays.gentoo.org/svn/dev/wrobel\nContact '\
': nobody@gentoo.org\nType : Subversion; Priority: '\
@@ -586,7 +588,7 @@ class OverlayObjTest(unittest.TestCase):
overlays = document.findall('overlay') + document.findall('repo')
output = Message()
- ovl = Overlay({'output': output}, overlays[0])
+ ovl = Overlay({'output': output, 'db_type': 'xml_db'}, xml=overlays[0])
test_short_list = 'wrobel [Subversion] '\
'(https://o.g.o/svn/dev/wrobel )'
self.assertEqual(ovl.short_list(80).decode('utf-8'), test_short_list)