No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_ledatasourcesql.py 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # -*- coding: utf8 -*-
  2. import unittest
  3. import sqlite3
  4. import pymysql
  5. from unittest import TestCase
  6. from leobject.datasources.ledatasourcesql import LeDataSourceSQL
  7. from mosql.db import Database
  8. class _LeDataSourceTestCase(TestCase):
  9. def setUp(self):
  10. self.mydatasource = LeDataSourceSQL()
  11. def tearDown(self):
  12. del self.mydatasource
  13. def test_connection(self):
  14. """Tests if the connection occurs"""
  15. self.assertIsInstance(obj=self.mydatasource, cls=LeDataSourceSQL, msg='A %s object was expected, %s obtained instead' % (LeDataSourceSQL.__class__, self.mydatasource.__class__))
  16. self.assertIsNotNone(obj=self.mydatasource.connection, msg='The database connection cursor could not be instanciated')
  17. self.assertIsInstance(self.mydatasource.connection, Database, msg='%s object was expected for the connection cursor, %s obtained instead' % (Database.__class__, self.mydatasource.connection.__class__))
  18. @unittest.skip
  19. def test_insert(self):
  20. pass
  21. @unittest.skip
  22. def test_get(self):
  23. pass
  24. @unittest.skip
  25. def test_update(self):
  26. pass
  27. @unittest.skip
  28. def test_delete(self):
  29. pass