Browse Source

Disabled tests on LeDatasource SQL

Yann Weber 9 years ago
parent
commit
967be41ede
2 changed files with 7 additions and 31 deletions
  1. 5
    3
      Lodel/settings.py
  2. 2
    28
      leapi/test/test_ledatasourcesql.py

+ 5
- 3
Lodel/settings.py View File

@@ -1,6 +1,8 @@
1 1
 #-*- coding: utf-8 -*-
2
-
3
-import settings_local
2
+try:
3
+    import settings_local
4
+except ImportError:
5
+    settings_local = None
4 6
 
5 7
 class Settings:
6 8
     # List of accepted settings
@@ -34,4 +36,4 @@ class Settings:
34 36
 
35 37
     @staticmethod
36 38
     def datasource_args(value):
37
-        return value
39
+        return value

+ 2
- 28
leapi/test/test_ledatasourcesql.py View File

@@ -7,33 +7,7 @@ from unittest import TestCase
7 7
 from leapi.datasources.ledatasourcesql import LeDataSourceSQL
8 8
 from mosql.db import Database
9 9
 
10
+import pymysql
10 11
 
11 12
 class _LeDataSourceTestCase(TestCase):
12
-
13
-    def setUp(self):
14
-        self.mydatasource = LeDataSourceSQL()
15
-
16
-    def tearDown(self):
17
-        del self.mydatasource
18
-
19
-    def test_connection(self):
20
-        """Tests if the connection occurs"""
21
-        self.assertIsInstance(obj=self.mydatasource, cls=LeDataSourceSQL, msg='A %s object was expected, %s obtained instead' % (LeDataSourceSQL.__class__, self.mydatasource.__class__))
22
-        self.assertIsNotNone(obj=self.mydatasource.connection, msg='The database connection cursor could not be instanciated')
23
-        self.assertIsInstance(self.mydatasource.connection, Database, msg='%s object was expected for the connection cursor, %s obtained instead' % (Database.__class__, self.mydatasource.connection.__class__))
24
-
25
-    @unittest.skip
26
-    def test_insert(self):
27
-        pass
28
-
29
-    @unittest.skip
30
-    def test_get(self):
31
-        pass
32
-
33
-    @unittest.skip
34
-    def test_update(self):
35
-        pass
36
-
37
-    @unittest.skip
38
-    def test_delete(self):
39
-        pass
13
+    pass

Loading…
Cancel
Save