Beispiel #1
0
    def test_db_exists(self):
        '''
        Tests for checks if a database exists in InfluxDB
        '''
        with patch.object(influx08, 'db_list', side_effect=[[{'name': 'A'}],
                                                          None]):
            self.assertTrue(influx08.db_exists(name='A',
                                               user='******',
                                               password='******',
                                               host='localhost',
                                               port=8000))

            self.assertFalse(influx08.db_exists(name='A',
                                                user='******',
                                                password='******',
                                                host='localhost',
                                                port=8000))
Beispiel #2
0
    def test_db_exists(self):
        '''
        Tests for checks if a database exists in InfluxDB
        '''
        with patch.object(influx08, 'db_list', side_effect=[[{'name': 'A'}],
                                                          None]):
            self.assertTrue(influx08.db_exists(name='A',
                                               user='******',
                                               password='******',
                                               host='localhost',
                                               port=8000))

            self.assertFalse(influx08.db_exists(name='A',
                                                user='******',
                                                password='******',
                                                host='localhost',
                                                port=8000))