Skip to content

Commit

Permalink
[#543] from .. import -> import ..
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Mar 3, 2013
1 parent d2ef6c8 commit ba42dfd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions ckanext/resourceproxy/tests/test_proxy.py
@@ -1,7 +1,7 @@
import requests
import unittest
import json
from httpretty import HTTPretty, httprettified
import httpretty

import paste.fixture
from pylons import config
Expand Down Expand Up @@ -64,11 +64,11 @@ def set_resource_url(self, url):

self.data_dict = {'resource': resource, 'package': package}

@httprettified
@httpretty.httprettified
def test_resource_proxy_on_200(self):
url = 'http://www.ckan.org/static/test.json'
HTTPretty.register_uri(
HTTPretty.GET, url,
httpretty.HTTPretty.register_uri(
httpretty.HTTPretty.GET, url,
content_type='application/json',
body=JSON_STRING)
self.set_resource_url(url)
Expand All @@ -78,11 +78,11 @@ def test_resource_proxy_on_200(self):
assert result.status_code == 200, result.status_code
assert "yes, I'm proxied" in result.content, result.content

@httprettified
@httpretty.httprettified
def test_resource_proxy_on_404(self):
url = 'http://www.ckan.org/static/test.json'
HTTPretty.register_uri(
HTTPretty.GET, url,
httpretty.HTTPretty.register_uri(
httpretty.HTTPretty.GET, url,
body="I'm not here",
content_type='application/json',
status=404)
Expand All @@ -96,11 +96,11 @@ def test_resource_proxy_on_404(self):
result = self.app.get(proxied_url, status='*')
assert result.status == 404, result.status

@httprettified
@httpretty.httprettified
def test_large_file(self):
url = 'http://www.ckan.org/static/huge.json'
HTTPretty.register_uri(
HTTPretty.GET, url,
httpretty.HTTPretty.register_uri(
httpretty.HTTPretty.GET, url,
content_length=controller.MAX_FILE_SIZE + 1,
body=JSON_STRING)
self.set_resource_url(url)
Expand Down

0 comments on commit ba42dfd

Please sign in to comment.