Merge pull request #17243 from edx/jmbowman/PLAT-1889

PLAT-1889 Fix URL config and reversal issues
This commit is contained in:
Jeremy Bowman
2018-01-19 12:50:16 -05:00
committed by GitHub
4 changed files with 11 additions and 17 deletions

View File

@@ -45,7 +45,7 @@ class ChangeEnterpriseUserUsernameCommandTests(TestCase):
Test that the command updates the user's username when the user is linked to an Enterprise.
"""
user = User.objects.create(is_active=True, username='old_username', email='test@example.com')
site = Site.objects.create(domain='example.com')
site, _ = Site.objects.get_or_create(domain='example.com')
enterprise_customer = EnterpriseCustomer.objects.create(
name='Test EnterpriseCustomer',
site=site

View File

@@ -16,13 +16,13 @@ from django.test.client import Client
from django.test.utils import override_settings
from mock import patch
from certificates.models import CertificateStatuses, GeneratedCertificate # pylint: disable=import-error
from certificates.tests.factories import GeneratedCertificateFactory # pylint: disable=import-error
from certificates.models import CertificateStatuses, GeneratedCertificate
from certificates.tests.factories import GeneratedCertificateFactory
# These imports refer to lms djangoapps.
# Their testcases are only run under lms.
from course_modes.tests.factories import CourseModeFactory
from openedx.core.djangoapps.commerce.utils import ECOMMERCE_DATE_FORMAT
from student.models import CourseEnrollment, CourseEnrollmentAttribute
from student.models import CourseEnrollment
from student.tests.factories import UserFactory
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory
@@ -191,5 +191,5 @@ class RefundableTest(SharedModuleStoreTestCase):
)
self.client.login(username=self.user.username, password=self.USER_PASSWORD)
resp = self.client.post(reverse('student.views.dashboard', args=[]))
resp = self.client.post(reverse('dashboard', args=[]))
self.assertEqual(resp.status_code, 200)