-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backend-specific dashboard launches depend on the name field
... being set and fail if there is none. We were drawing in this information from the auth_user.first_name and .last_name fields, which are deprecated on the edX platform.
- Loading branch information
Matt Hughes
committed
Jun 14, 2019
1 parent
113b98b
commit e18915e
Showing
9 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,8 @@ | |
from edx_proctoring.runtime import set_runtime_service, get_runtime_service | ||
from edx_proctoring.urls import urlpatterns | ||
|
||
from mock_apps.models import Profile | ||
|
||
from .test_services import MockCreditService, MockInstructorService | ||
from .utils import LoggedInTestCase | ||
|
||
|
@@ -2600,6 +2602,10 @@ class TestInstructorDashboard(LoggedInTestCase): | |
""" | ||
def setUp(self): | ||
super(TestInstructorDashboard, self).setUp() | ||
profile = Profile() | ||
profile.name = 'boo radley' | ||
profile.user = self.user | ||
profile.save() | ||
self.user.is_staff = True | ||
self.user.save() | ||
self.second_user = User(username='tester2', email='[email protected]') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.apps import AppConfig | ||
|
||
|
||
class MockAppsConfig(AppConfig): | ||
name = 'mock_apps' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.contrib.auth import get_user_model | ||
from django.db import models | ||
|
||
class Profile(models.Model): | ||
user = models.OneToOneField(get_user_model()) | ||
name = models.CharField(max_length=100) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters