Jon Gales avatar Jon Gales committed 0127e6e

Tests updated to deal with 30 character max user last name

Comments (0)

Files changed (1)

 from django.contrib.auth.models import User
 from django.core.urlresolvers import reverse
+from django.utils.http import urlquote
 import django.test
 from django.conf import settings
         u = User.objects.create_user('nikos', '', password='secret')
         u.first_name = "Δεν ελπίζω τίποτε."
-        u.last_name = "Δεν φοβούμαι τίποτε. Είμαι λεύτερος."
+        u.last_name = "Δεν φοβούμαι τίποτε."
         self.client.login(username='nikos', password='secret')
         response = self.client.get(reverse(views.authorize), { 'timestamp': 100 }, follow=False)
         self.assertEqual(response.status_code, 302)
-        self.assertEqual(response['Location'], r'')
+        name = urlquote("%s %s" % (u.first_name, u.last_name))
+        self.assertEqual(response['Location'], r'%s/access/remote/?name=%s&email=%s&timestamp=100&hash=00d5e1de5c8a20b2d4aeb23c7eb07fe1' % (settings.ZENDESK_URL, name, urlquote(
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.