Unit test tweaks

This commit is contained in:
Basraah
2017-09-26 15:13:37 +10:00
parent ef26cdbbee
commit 650408f61c
14 changed files with 27 additions and 41 deletions

View File

@@ -123,14 +123,13 @@ class Phpbb3HooksTestCase(TestCase):
class Phpbb3ViewsTestCase(TestCase):
def setUp(self):
self.member = AuthUtils.create_member('auth_member')
self.member.set_password('password')
self.member.email = 'auth_member@example.com'
self.member.save()
AuthUtils.add_main_character(self.member, 'auth_member', '12345', corp_id='111', corp_name='Test Corporation')
add_permissions()
def login(self):
self.client.login(username=self.member.username, password='password')
self.client.force_login(self.member)
@mock.patch(MODULE_PATH + '.tasks.Phpbb3Manager')
@mock.patch(MODULE_PATH + '.views.Phpbb3Manager')