[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 3/4] Fix import errors in the unit tests.



---
 tests/storage_test/devicelibs_test/edd_test.py |    4 ++--
 tests/tsort_test.py                            |   22 +++++++++++-----------
 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 427ff21..a996e42 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 7547291..d16ee76 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)
 
-- 
1.7.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]