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.1KB

1234567891011121314151617181920212223242526272829303132333435
  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. def test_insert(self):
  19. pass
  20. def test_get(self):
  21. pass
  22. def test_update(self):
  23. pass
  24. def test_delete(self):
  25. pass