Commit e8925972 by Adam

Merge pull request #11168 from edx/adam/fix-userstanding-page

userstanding is now OneToOneField
parents 96478f82 7dc54723
......@@ -58,6 +58,13 @@ class UserStandingTest(TestCase):
# 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(
UserStanding.objects.filter(user=self.good_user).count(), 0
......
......@@ -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}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment