Merge pull request #411 from mrkiwi-nz/issue_408_fix

fix #408 : Bug in test_per_queue_staff_permission.py
This commit is contained in:
Ross Poulton 2016-06-30 10:36:20 +10:00 committed by GitHub
commit da5a4dc40f

View File

@ -41,7 +41,7 @@ class PerQueueStaffMembershipTestCase(TestCase):
username='User_%d' % identifier,
is_staff=True,
)
user.set_password(identifier)
user.set_password(str(identifier))
user.save()
# The prefix 'helpdesk.' must be trimmed
@ -74,7 +74,7 @@ class PerQueueStaffMembershipTestCase(TestCase):
# Regular users
for identifier in self.IDENTIFIERS:
self.client.login(username='User_%d' % identifier, password=identifier)
self.client.login(username='User_%d' % identifier, password=str(identifier))
response = self.client.get(reverse('helpdesk_dashboard'))
self.assertEqual(
len(response.context['unassigned_tickets']),
@ -131,7 +131,7 @@ class PerQueueStaffMembershipTestCase(TestCase):
"""
# Regular users
for identifier in self.IDENTIFIERS:
self.client.login(username='User_%d' % identifier, password=identifier)
self.client.login(username='User_%d' % identifier, password=str(identifier))
response = self.client.get(reverse('helpdesk_list'))
self.assertEqual(
len(response.context['tickets']),
@ -166,7 +166,7 @@ class PerQueueStaffMembershipTestCase(TestCase):
"""
# Regular users
for identifier in self.IDENTIFIERS:
self.client.login(username='User_%d' % identifier, password=identifier)
self.client.login(username='User_%d' % identifier, password=str(identifier))
response = self.client.get(
reverse('helpdesk_run_report', kwargs={'report': 'userqueue'})
)