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', 'kazantzakis@example.com', password='secret')
         u.first_name = "Δεν ελπίζω τίποτε."
-        u.last_name = "Δεν φοβούμαι τίποτε. Είμαι λεύτερος."
+        u.last_name = "Δεν φοβούμαι τίποτε."
         u.save()
         
         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'http://example.com/access/remote/?name=%CE%94%CE%B5%CE%BD%20%CE%B5%CE%BB%CF%80%CE%AF%CE%B6%CF%89%20%CF%84%CE%AF%CF%80%CE%BF%CF%84%CE%B5.%20%CE%94%CE%B5%CE%BD%20%CF%86%CE%BF%CE%B2%CE%BF%CF%8D%CE%BC%CE%B1%CE%B9%20%CF%84%CE%AF%CF%80%CE%BF%CF%84%CE%B5.%20%CE%95%CE%AF%CE%BC%CE%B1%CE%B9%20%CE%BB%CE%B5%CF%8D%CF%84%CE%B5%CF%81%CE%BF%CF%82.&email=kazantzakis%40example.com&timestamp=100&hash=716ce442f7d093aa30bae0c1f4b4c0ef')
+        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(u.email)))
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 ProjectModifiedEvent.java.
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.