|
@@ -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
|