def test_show_series_with_args_success(self): res = InfluxDBAdmin.show_series( measurements=['param1', 'param2'], criteria=[Field('phase') == 'moon'], limit=10, offset=10, ) assert res is not None
def test_generate_where_clause_with_two_measurement_success(self): clause = admin.GenericDBAdminCommand._generate_where_clause([ Field('time') < 20, Field('phase') == 'MOON', ]) assert clause == 'WHERE "time" < 20 AND "phase" = \'MOON\''
def test_generate_where_clause_success(self): clause = admin.GenericDBAdminCommand._generate_where_clause( [Field('time') < 20]) assert clause == 'WHERE "time" < 20'
def test_show_series_with_criteria_success(self): res = InfluxDBAdmin.show_series(criteria=[Field('phase') == 'moon'], ) assert res is not None
def test_show_measurements_with_criteria_success_2(self): res = InfluxDBAdmin.show_measurements(criteria=[ Field('phase') == 'moon', Field('phase') == 'sun', ], ) assert res is not None
def test_drop_series_success_2(self): res = InfluxDBAdmin.drop_series(criteria=[Field('phase') == 'moon']) assert res is True
def test_delete_success_2(self): res = InfluxDBAdmin.delete(criteria=[Field('time') < 10], ) assert res is True