comparison antispam/tests/test_receivers.py @ 940:0cff6acf7d61

Don't need to create our own test client.
author Brian Neal <bgneal@gmail.com>
date Wed, 29 Apr 2015 20:31:35 -0500
parents 9d6c2ed2f348
children
comparison
equal deleted inserted replaced
939:3782fa705821 940:0cff6acf7d61
1 """Tests for the antispam signal handlers.""" 1 """Tests for the antispam signal handlers."""
2 import logging 2 import logging
3 3
4 from django.contrib.auth.models import User 4 from django.contrib.auth.models import User
5 from django.test import Client
6 from django.test import TestCase 5 from django.test import TestCase
7 6
8 from testfixtures import log_capture 7 from testfixtures import log_capture
9 8
10 9
11 class AntispamSignalRcvrTestCase(TestCase): 10 class AntispamSignalRcvrTestCase(TestCase):
12 11
13 def setUp(self): 12 def setUp(self):
14 self.user = User.objects.create_user('steve', 'steve@example.com', 'pwd') 13 self.user = User.objects.create_user('steve', 'steve@example.com', 'pwd')
15 self.client = Client()
16 14
17 # Temporarily enable logging 15 # Temporarily enable logging
18 self.old_disable = logging.getLogger().manager.disable 16 self.old_disable = logging.getLogger().manager.disable
19 logging.disable(logging.NOTSET) 17 logging.disable(logging.NOTSET)
20 18