1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.8.x] Replaced hardcoded URLs in admin_* tests

Refs #15779. This will allow easier admin URL changes, when needed.
Thanks Simon Charette for the review.

Backport of 32e6a7d3a5 from master
This commit is contained in:
Claude Paroz
2015-02-06 23:25:15 +01:00
committed by Tim Graham
parent d54638727a
commit cd260d03bd
8 changed files with 707 additions and 658 deletions

View File

@@ -365,7 +365,7 @@ class ChangeListTests(TestCase):
username='super', email='super@localhost', password='secret')
self.client.login(username='super', password='secret')
event = Event.objects.create(date=datetime.date.today())
response = self.client.get('/admin/admin_changelist/event/')
response = self.client.get(reverse('admin:admin_changelist_event_changelist'))
self.assertContains(response, formats.localize(event.date))
self.assertNotContains(response, six.text_type(event.date))
@@ -678,7 +678,7 @@ class SeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
"""
self.admin_login(username='super', password='secret')
self.selenium.get('%s%s' % (self.live_server_url,
'/admin/auth/user/'))
reverse('admin:auth_user_changelist')))
form_id = '#changelist-form'