userstanding is now OneToOneField
This commit is contained in:
@@ -57,6 +57,13 @@ class UserStandingTest(TestCase):
|
||||
# since it's only possible to disable accounts from lms, we're going
|
||||
# to skip tests for cms
|
||||
|
||||
@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms')
|
||||
def test_can_access_manage_account_page(self):
|
||||
response = self.admin_client.get(reverse('manage_user_standing'), {
|
||||
'user': self.admin,
|
||||
})
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms')
|
||||
def test_disable_account(self):
|
||||
self.assertEqual(
|
||||
|
||||
@@ -1346,7 +1346,7 @@ def manage_user_standing(request):
|
||||
headers = ['username', 'account_changed_by']
|
||||
rows = []
|
||||
for user in all_disabled_users:
|
||||
row = [user.username, user.standing.all()[0].changed_by]
|
||||
row = [user.username, user.standing.changed_by]
|
||||
rows.append(row)
|
||||
|
||||
context = {'headers': headers, 'rows': rows}
|
||||
|
||||
Reference in New Issue
Block a user