'Test create retention policy for TestInfluxDBClient object.'

def test_create_retention_policy(self):

    example_response = u'{"results":[{}]}'
    with requests_mock.Mocker() as m:
        m.register_uri(requests_mock.GET, u'http://localhost:8086/query', text=example_response)
        self.cli.create_retention_policy(u'somename', u'1d', 4, database=u'db')
        self.assertEqual(m.last_request.qs[u'q'][0], u'create    retention    policy    "somename"    on    "db"    duration    1d    replication    4')
