def test_make_sure_returns_response(self, mock_request):
        response = Response()
        response.status_code = 200
        response._content = b'[{"data-type":"type"}]'
        mock_request.return_value = response
        mock_request.__name__ = 'get'

        api = AdminAPI('http://admin.api', 'token')
        data_sets = api.list_data_sets()

        eq_(data_sets[0]['data-type'], 'type')
    def test_make_sure_returns_response(self, mock_request):
        response = Response()
        response.status_code = 200
        response._content = b'[{"data-type":"type"}]'
        mock_request.return_value = response
        mock_request.__name__ = 'get'

        api = AdminAPI('http://admin.api', 'token')
        data_sets = api.list_data_sets()

        eq_(data_sets[0]['data-type'], 'type')
    def test_dry_run(self, mock_request):
        api = AdminAPI('http://admin.api', 'token', dry_run=True)
        api.list_data_sets()

        eq_(mock_request.called, False)
    def test_dry_run(self, mock_request):
        api = AdminAPI('http://admin.api', 'token', dry_run=True)
        api.list_data_sets()

        eq_(mock_request.called, False)