Beispiel #1
0
 def test_retention_policy_modify(self):
     client = MockInfluxDBClient()
     with patch.object(influx08, '_client', MagicMock(return_value=client)):
         client.alter_retention_policy = MagicMock()
         self.assertTrue(influx08.retention_policy_alter(
             database='db',
             name='name',
             duration='30d',
             replication=1,
         ))
         client.alter_retention_policy.assert_called_once_with(
             'name', 'db', '30d', 1, False)
Beispiel #2
0
 def test_retention_policy_modify(self):
     client = MockInfluxDBClient()
     with patch.object(influx08, '_client', MagicMock(return_value=client)):
         client.alter_retention_policy = MagicMock()
         self.assertTrue(influx08.retention_policy_alter(
             database='db',
             name='name',
             duration='30d',
             replication=1,
         ))
         client.alter_retention_policy.assert_called_once_with(
             'name', 'db', '30d', 1, False)