userstanding is now OneToOneField

This commit is contained in:
Adam Palay
2016-01-07 15:11:23 -05:00
parent 99b029969c
commit 7dc54723d3
2 changed files with 8 additions and 1 deletions

View File

@@ -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(

View File

@@ -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}