summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2011-07-29 10:52:10 -0400
committerChris Lumens <clumens@redhat.com>2011-08-01 10:02:28 -0400
commit3d40080aba68361a8d46200b7a8afa46021598bf (patch)
tree516f0ed8f4ca2242757fc6e72202ff1e74e23ade /tests
parentcd66c6bf33cae14e74001349043e585e348e2e9a (diff)
downloadanaconda-3d40080aba68361a8d46200b7a8afa46021598bf.tar.gz
anaconda-3d40080aba68361a8d46200b7a8afa46021598bf.tar.xz
anaconda-3d40080aba68361a8d46200b7a8afa46021598bf.zip
Fix import errors in the unit tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/storage_test/devicelibs_test/edd_test.py4
-rw-r--r--tests/tsort_test.py22
2 files changed, 13 insertions, 13 deletions
diff --git a/tests/storage_test/devicelibs_test/edd_test.py b/tests/storage_test/devicelibs_test/edd_test.py
index 427ff2165..a996e42b8 100644
--- a/tests/storage_test/devicelibs_test/edd_test.py
+++ b/tests/storage_test/devicelibs_test/edd_test.py
@@ -104,11 +104,11 @@ class EddTestCase(mock.TestCase):
""" Test scenario when the 0x80 and 0x81 edd directories contain the
same data and give no way to distinguish among the two devices.
"""
- from storage.devicelibs import edd
+ from pyanaconda.storage.devicelibs import edd
edd.log = mock.Mock()
edd.collect_mbrs = mock.Mock(return_value={'sda' : '0x000ccb01',
'vda' : '0x0006aef1'})
- fs = EddTestFS(edd).sda_sdb_same()
+ fs = EddTestFS(self, edd).sda_sdb_same()
self.assertEqual(edd.get_edd_dict([]), {})
self.assertIn((('edd: both edd entries 0x80 and 0x81 seem to map to sda',), {}),
edd.log.info.call_args_list)
diff --git a/tests/tsort_test.py b/tests/tsort_test.py
index 7547291ba..d16ee7635 100644
--- a/tests/tsort_test.py
+++ b/tests/tsort_test.py
@@ -1,33 +1,33 @@
import unittest
-import tsort
+import pyanaconda.tsort
class TopologicalSortTestCase(unittest.TestCase):
def runTest(self):
items = [1, 2, 3, 4, 5]
edges = [(5, 4), (4, 3), (3, 2), (2, 1)]
- graph = tsort.create_graph(items, edges)
+ graph = pyanaconda.tsort.create_graph(items, edges)
self._tsortTest(graph)
edges = [(5, 4), (2, 3), (1, 5)]
- graph = tsort.create_graph(items, edges)
+ graph = pyanaconda.tsort.create_graph(items, edges)
self._tsortTest(graph)
edges = [(5, 4), (4, 3), (3, 2), (2, 1), (3, 5)]
- graph = tsort.create_graph(items, edges)
- self.failUnlessRaises(tsort.CyclicGraphError,
- tsort.tsort,
+ graph = pyanaconda.tsort.create_graph(items, edges)
+ self.failUnlessRaises(pyanaconda.tsort.CyclicGraphError,
+ pyanaconda.tsort.tsort,
graph)
edges = [(5, 4), (4, 3), (3, 2), (2, 1), (2, 3)]
- graph = tsort.create_graph(items, edges)
- self.failUnlessRaises(tsort.CyclicGraphError,
- tsort.tsort,
+ graph = pyanaconda.tsort.create_graph(items, edges)
+ self.failUnlessRaises(pyanaconda.tsort.CyclicGraphError,
+ pyanaconda.tsort.tsort,
graph)
items = ['a', 'b', 'c', 'd']
edges = [('a', 'c'), ('c', 'b')]
- graph = tsort.create_graph(items, edges)
+ graph = pyanaconda.tsort.create_graph(items, edges)
self._tsortTest(graph)
def _tsortTest(self, graph):
@@ -40,7 +40,7 @@ class TopologicalSortTestCase(unittest.TestCase):
return True
try:
- order = tsort.tsort(graph)
+ order = pyanaconda.tsort.tsort(graph)
except Exception as e:
self.fail(e)