def test_props_invalid_status(self): pool = mock.Mock(spec=riakcached.pools.Pool) pool.request.return_value = 204, "", {} pool.url = "http://127.0.0.1:8098" client = RiakClient("test_bucket", pool=pool) self.assertIsNone(client.props())
def test_props_invalid_status(self): pool = mock.Mock(spec=riakcached.pools.Pool) pool.request.return_value = 204, "", {} pool.url = "http://127.0.0.1:8098" client = RiakClient("test_bucket", pool=pool) self.assertIsNone(client.props())
def test_props_valid_status(self): pool = mock.Mock(spec=riakcached.pools.Pool) pool.request.return_value = 200, '{"test": "props"}', {} pool.url = "http://127.0.0.1:8098" client = RiakClient("test_bucket", pool=pool) self.assertEqual(client.props(), { "test": "props", })
def test_props_valid_status(self): pool = mock.Mock(spec=riakcached.pools.Pool) pool.request.return_value = 200, '{"test": "props"}', {} pool.url = "http://127.0.0.1:8098" client = RiakClient("test_bucket", pool=pool) self.assertEqual(client.props(), { "test": "props", })