1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Replaced hardcoded URLs in admin_* tests

Refs #15779. This will allow easier admin URL changes, when needed.
Thanks Simon Charette for the review.
This commit is contained in:
Claude Paroz
2015-02-06 23:25:15 +01:00
parent 9033003d97
commit 32e6a7d3a5
8 changed files with 693 additions and 647 deletions

View File

@@ -368,7 +368,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))
@@ -681,7 +681,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'