PEP-8 fixes

This commit is contained in:
Garret Wassermann 2017-04-20 02:44:12 -04:00
parent bf344b09b1
commit 47f3eb8e89
2 changed files with 11 additions and 11 deletions

View File

@ -387,7 +387,7 @@ def ticket_from_message(message, queue, logger):
all_users = User.objects.all()
all_user_emails = set([x.email for x in all_users])
users_not_currently_ccd = all_user_emails.difference(set(current_cc))
users_to_cc = cc.intersection( users_not_currently_ccd )
users_to_cc = cc.intersection(users_not_currently_ccd)
for user in users_to_cc:
tcc = TicketCC.objects.create(
ticket=t,

View File

@ -355,6 +355,7 @@ class GetEmailParametricTemplate(object):
self.assertEqual(attach2.followup.id, 2)
self.assertEqual(attach2.filename, 'email_html_body.html')
class GetEmailCCHandling(TestCase):
"""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)
def tearDown(self):
rmtree(self.temp_logdir)
@ -459,6 +459,7 @@ class GetEmailCCHandling(TestCase):
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('builtins.open' if six.PY3 else '__builtin__.open', mock.mock_open(read_data=test_email)):
mocked_isfile.return_value = True
mocked_listdir.return_value = ['filename1']
@ -508,6 +509,5 @@ for method, socks in case_matrix:
cl = type(test_name,
(GetEmailParametricTemplate,TestCase,),
{ "method": method, "socks": socks}
)
{"method": method, "socks": socks})
setattr(thismodule, test_name, cl)