Commit 51e1f76a authored by Sofia Papagiannaki's avatar Sofia Papagiannaki

snf_ci: Add oa2 app tests

parent d559bda5
......@@ -22,7 +22,7 @@ runCoverage () {
export SYNNEFO_SETTINGS_DIR=/tmp/snf-test-settings
ASTAKOS_APPS="im quotaholder_app"
ASTAKOS_APPS="im quotaholder_app oa2"
CYCLADES_APPS="api db logic plankton quotas vmapi helpdesk userdata"
PITHOS_APPS="api"
......
......@@ -42,10 +42,10 @@ from django.test import TransactionTestCase as TestCase
from django.test import Client as TestClient
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django.utils import simplejson as json
from astakos.oa2.models import Client, AuthorizationCode, Token
from astakos.im.models import AstakosUser
ParsedURL = namedtuple('ParsedURL', ['host', 'scheme', 'path', 'params',
......@@ -221,7 +221,7 @@ class TestOA2(TestCase, URLAssertionsMixin):
self.fail("Invalid access_token")
def setUp(self):
baseurl = reverse('oa2_authenticate').replace('/auth', '/')
baseurl = reverse('oauth2_authenticate').replace('/auth', '/')
self.client = OA2Client(baseurl)
client1 = Client.objects.create(identifier="client1", secret="secret")
self.client1_redirect_uri = "https://server.com/handle_code"
......@@ -236,7 +236,7 @@ class TestOA2(TestCase, URLAssertionsMixin):
self.client3_redirect_uri = "https://server3.com/handle_code"
client3.redirecturl_set.create(url=self.client3_redirect_uri)
u = User.objects.create(username="user@synnefo.org")
u = AstakosUser.objects.create(username="user@synnefo.org")
u.set_password("password")
u.save()
......
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