Commit 8c534756 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

pithos: Fix tests

parent 9bf22c92
...@@ -234,10 +234,10 @@ class PithosAPITest(TestCase): ...@@ -234,10 +234,10 @@ class PithosAPITest(TestCase):
mock_get_token.return_value = {'access_token': 'valid_token'} mock_get_token.return_value = {'access_token': 'valid_token'}
# patch astakosclient.AstakosClient.api_oa2_auth # patch astakosclient.AstakosClient.api_oa2_auth
mock_api_oa2_auth = self.create_patch( mock_api_oauth2_auth = self.create_patch(
'astakosclient.AstakosClient.oa2_url', 'astakosclient.AstakosClient.oauth2_url',
new_callable=PropertyMock) new_callable=PropertyMock)
mock_api_oa2_auth.return_value = '/astakos/oa2/' mock_api_oauth2_auth.return_value = '/astakos/oauth2/'
def tearDown(self): def tearDown(self):
#delete additionally created metadata #delete additionally created metadata
......
...@@ -46,7 +46,6 @@ from synnefo.lib import join_urls ...@@ -46,7 +46,6 @@ from synnefo.lib import join_urls
from urllib import quote from urllib import quote
import django.utils.simplejson as json import django.utils.simplejson as json
from django.core.urlresolvers import reverse
import re import re
import datetime import datetime
...@@ -127,7 +126,7 @@ class ObjectGetView(PithosAPITest): ...@@ -127,7 +126,7 @@ class ObjectGetView(PithosAPITest):
self.assertTrue('Location' in r) self.assertTrue('Location' in r)
p = urlparse.urlparse(r['Location']) p = urlparse.urlparse(r['Location'])
self.assertEqual(p.netloc, 'testserver') self.assertEqual(p.netloc, 'testserver')
self.assertEqual(p.path, reverse('oa2_authenticate')) self.assertEqual(p.path, '/astakos/oauth2/auth')
r = self.get(add_url_params(self.view_url, code='valid_code'), r = self.get(add_url_params(self.view_url, code='valid_code'),
follow=True) follow=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment