Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
 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\''
Ejemplo n.º 3
0
 def test_generate_where_clause_success(self):
     clause = admin.GenericDBAdminCommand._generate_where_clause(
         [Field('time') < 20])
     assert clause == 'WHERE "time" < 20'
Ejemplo n.º 4
0
 def test_show_series_with_criteria_success(self):
     res = InfluxDBAdmin.show_series(criteria=[Field('phase') == 'moon'], )
     assert res is not None
Ejemplo n.º 5
0
 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
Ejemplo n.º 6
0
 def test_drop_series_success_2(self):
     res = InfluxDBAdmin.drop_series(criteria=[Field('phase') == 'moon'])
     assert res is True
Ejemplo n.º 7
0
 def test_delete_success_2(self):
     res = InfluxDBAdmin.delete(criteria=[Field('time') < 10], )
     assert res is True