mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-31 10:29:15 +01:00
PEP-8 fixes
This commit is contained in:
parent
bf344b09b1
commit
47f3eb8e89
@ -355,6 +355,7 @@ class GetEmailParametricTemplate(object):
|
|||||||
self.assertEqual(attach2.followup.id, 2)
|
self.assertEqual(attach2.followup.id, 2)
|
||||||
self.assertEqual(attach2.filename, 'email_html_body.html')
|
self.assertEqual(attach2.filename, 'email_html_body.html')
|
||||||
|
|
||||||
|
|
||||||
class GetEmailCCHandling(TestCase):
|
class GetEmailCCHandling(TestCase):
|
||||||
"""TestCase that checks CC handling in email. Needs its own test harness."""
|
"""TestCase that checks CC handling in email. Needs its own test harness."""
|
||||||
|
|
||||||
@ -422,7 +423,6 @@ class GetEmailCCHandling(TestCase):
|
|||||||
}
|
}
|
||||||
self.original_cc = TicketCC.objects.create(**cc_kwargs)
|
self.original_cc = TicketCC.objects.create(**cc_kwargs)
|
||||||
|
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
|
|
||||||
rmtree(self.temp_logdir)
|
rmtree(self.temp_logdir)
|
||||||
@ -459,6 +459,7 @@ class GetEmailCCHandling(TestCase):
|
|||||||
with mock.patch('helpdesk.management.commands.get_email.listdir') as mocked_listdir, \
|
with mock.patch('helpdesk.management.commands.get_email.listdir') as mocked_listdir, \
|
||||||
mock.patch('helpdesk.management.commands.get_email.isfile') as mocked_isfile, \
|
mock.patch('helpdesk.management.commands.get_email.isfile') as mocked_isfile, \
|
||||||
mock.patch('builtins.open' if six.PY3 else '__builtin__.open', mock.mock_open(read_data=test_email)):
|
mock.patch('builtins.open' if six.PY3 else '__builtin__.open', mock.mock_open(read_data=test_email)):
|
||||||
|
|
||||||
mocked_isfile.return_value = True
|
mocked_isfile.return_value = True
|
||||||
mocked_listdir.return_value = ['filename1']
|
mocked_listdir.return_value = ['filename1']
|
||||||
|
|
||||||
@ -508,6 +509,5 @@ for method, socks in case_matrix:
|
|||||||
|
|
||||||
cl = type(test_name,
|
cl = type(test_name,
|
||||||
(GetEmailParametricTemplate,TestCase,),
|
(GetEmailParametricTemplate,TestCase,),
|
||||||
{ "method": method, "socks": socks}
|
{"method": method, "socks": socks})
|
||||||
)
|
|
||||||
setattr(thismodule, test_name, cl)
|
setattr(thismodule, test_name, cl)
|
||||||
|
Loading…
Reference in New Issue
Block a user