[test] remove useless use of MockConnection in unittest_writer draft
authorDavid Douard <david.douard@logilab.fr>
Sun, 26 Oct 2014 18:26:52 +0100
changeset 1765 3c579657557f
parent 1764 8473295c50b1
child 1766 42e60f760703
[test] remove useless use of MockConnection in unittest_writer
test/unittest_writer.py
--- a/test/unittest_writer.py	Sun Oct 26 15:41:11 2014 +0100
+++ b/test/unittest_writer.py	Sun Oct 26 18:26:52 2014 +0100
@@ -1,19 +1,14 @@
 #!/usr/bin/python
 """unit tests for the apycotlib.writer module"""
 
-import os
 from logilab.common.testlib import TestCase, unittest_main
-
-import cubicweb.devtools
-from cubes.apycot.testutils import MockConnection
-
+import cubes.apycot.testutils # required for sys.path black magic
 from apycotlib.writer import BaseDataWriter
 
-
 class BaseDataWriterTC(TestCase):
 
     def setUp(self):
-        self.writer = BaseDataWriter(MockConnection('narval0'), 1)
+        self.writer = BaseDataWriter(None, 1)
 
     def test__msg_info_01(self):
         path, line, msg = self.writer._msg_info('bonjour %s', 'vous')
@@ -29,7 +24,7 @@
 
     def test__msg_info_03(self):
         try:
-            os.path.isdir(1)
+            I_dont_exist
         except:
             path, line, msg = self.writer._msg_info('oops %s', 'badaboum', tb=True)
         self.assertEqual(path, None)