def test_t46(): args = { 'connection_info': { "type": "mysql", "host": "localhost", "namespace": "testtest", "user": "******", "password": "******", "port": 3306 }, "tablename": "test_all_datatypes", "select_fields": ["id", "name"], "limit": "5", "offset": "20", "order_by": "id", "filter": [{ "operand": "id", "operator": ">", "value": 10 }, { "operand": "is_active", "operator": "=", "value": True }] } datastorex.select(args)
def test_t64(): args = { 'connection_info': { "type": "mysql", "host": "localhost", "namespace": "testtest", "user": "******", "password": "******", "port": 3306 }, "tablename": "test_all_datatypes", "select_fields": ["id", "name", "dob"], "limit": "5", "offset": "20", "order_by": "id", "filter": [{ "operand": "dob", "operator": "not in", "value": ["2016-02-01", "2016-02-09 23:59:59"] }] } datastorex.select(args)
def test_t36(): args = { 'connection_info': { "type": "mysql", "host": "localhost", "namespace": "testtest", "user": "******", "password": "******", "port": 3306 }, "tablename": "test_all_datatypes", "select_fields": ["id", "name"], "limit": "5", "offset": "20", "order_by": "id", "filter": [{ "operand": "height", "operator": "not in", "value": [10.23, 11, 12.45, 1, -89] }] } datastorex.select(args)
def test_t7(): with pytest.raises(Exception) as e: args = { 'connection_info': { "type": "mysql", "host": "localhost", "namespace": "freedata", "user": "******", "password": "******", "port": "1234" } } datastorex.select(args)
def test_t11(): args = { 'connection_info': { "type": "mysql", "host": "localhost", "namespace": "testtest", "user": "******", "password": "******", "port": 3306 }, "tablename": "yoooo" } datastorex.select(args)
def test_t9(): with pytest.raises(Exception) as e: args = { 'connection_info': { "type": "sqlite", "host": "localhost", "namespace": "freedata", "user": "******", "password": "******", "port": "1234" }, "tablename": "ohhlala" } datastorex.select(args)
def test_t10(): with pytest.raises(Exception) as e: args = { 'connection_info': { "type": "mysql", "host": "localhost", "namespace": "testtest", "user": "******", "password": "******", "port": 3306 }, "tablename": "ohhlala" } datastorex.select(args)
def test_t19(): args = { 'connection_info': { "type": "mysql", "host": "localhost", "namespace": "testtest", "user": "******", "password": "******", "port": 3306 }, "tablename": "test_all_datatypes", "select_fields": ["dob_tz"], "limit": "10" } datastorex.select(args)
def test_t15(): args = { 'connection_info': { "type": "mysql", "host": "localhost", "namespace": "testtest", "user": "******", "password": "******", "port": 3306 }, "tablename": "yoooo", "select_fields": ["aTTr9", "Attr1"], "limit": "2" } datastorex.select(args)
def test_t16(): with pytest.raises(Exception) as e: args = { 'connection_info': { "type": "mysql", "host": "localhost", "namespace": "testtest", "user": "******", "password": "******", "port": 3306 }, "tablename": "test_all_datatypes", "select_fields": ["", ""], "limit": "2" } datastorex.select(args)
def test_t65(): args = { 'order_by': '', 'connection_info': { 'namespace': 'testtest', 'host': 'localhost', 'user': '******', 'password': '******', 'type': 'mysql', 'port': '3306' }, 'tablename': 'category', 'filter': [], 'limit': '', 'offset': '', 'select_fields': [] } datastorex.select(args)
def test_t22(): args = { 'connection_info': { "type": "mysql", "host": "localhost", "namespace": "testtest", "user": "******", "password": "******", "port": 3306 }, "tablename": "test_all_datatypes", "select_fields": ["id", "name", "height", "is_active", "dob", "dob_tz"], "limit": "5", "offset": "20", "order_by": "id desc" } datastorex.select(args)
def test_t2(): with pytest.raises(Exception) as e: args = '' datastorex.select(args)
def test_t4(): with pytest.raises(Exception) as e: args = {'connection_info': {}} datastorex.select(args)
def test_t6(): with pytest.raises(Exception) as e: args = {'connection_info': {"type": "mysql"}} datastorex.select(args)
def test_t5(): with pytest.raises(Exception) as e: args = {'connection_info': {"tablename": "yoooo"}} datastorex.select(args)
def test_t1(): with pytest.raises(Exception) as e: datastorex.select()