rename test class names from Test* to *Test

This commit is contained in:
Jan Dittberner 2014-06-01 22:41:42 +02:00
parent 773dbea0fe
commit b9d39f31a4

View file

@ -25,7 +25,7 @@ from managemails.models import (
) )
class TestReadOnlyPasswordHashWidget(TestCase): class ReadOnlyPasswordHashWidgetTest(TestCase):
def test_render(self): def test_render(self):
widget = ReadOnlyPasswordHashWidget() widget = ReadOnlyPasswordHashWidget()
rendered = widget.render('password', 'secret', {'class': 'test'}) rendered = widget.render('password', 'secret', {'class': 'test'})
@ -38,7 +38,7 @@ class TestReadOnlyPasswordHashWidget(TestCase):
)) ))
class TestReadOnlyPasswordHashField(TestCase): class ReadOnlyPasswordHashFieldTest(TestCase):
def test___init__(self): def test___init__(self):
field = ReadOnlyPasswordHashField() field = ReadOnlyPasswordHashField()
self.assertFalse(field.required) self.assertFalse(field.required)
@ -52,7 +52,7 @@ class TestReadOnlyPasswordHashField(TestCase):
self.assertFalse(field._has_changed('new', 'old')) self.assertFalse(field._has_changed('new', 'old'))
class TestMailboxCreationForm(TestCase): class MailboxCreationFormTest(TestCase):
def test_clean_password2_same(self): def test_clean_password2_same(self):
form = MailboxCreationForm() form = MailboxCreationForm()
form.cleaned_data = {'password1': 'secret', 'password2': 'secret'} form.cleaned_data = {'password1': 'secret', 'password2': 'secret'}
@ -105,7 +105,7 @@ class TestMailboxCreationForm(TestCase):
len(Mailbox.objects.filter(osuser=user)), 0) len(Mailbox.objects.filter(osuser=user)), 0)
class TestMailboxChangeForm(TestCase): class MailboxChangeFormTest(TestCase):
@override_settings( @override_settings(
CELERY_ALWAYS_EAGER=True, CELERY_ALWAYS_EAGER=True,
CELERY_CACHE_BACKEND='memory', CELERY_CACHE_BACKEND='memory',
@ -119,7 +119,7 @@ class TestMailboxChangeForm(TestCase):
self.assertEqual(form.clean_password(), mailbox.password) self.assertEqual(form.clean_password(), mailbox.password)
class TestActivationChangeMixin(TestCase): class ActivationChangeMixinTest(TestCase):
def test_activate(self): def test_activate(self):
querysetmock = Mock() querysetmock = Mock()
activationchange = ActivationChangeMixin() activationchange = ActivationChangeMixin()
@ -133,7 +133,7 @@ class TestActivationChangeMixin(TestCase):
querysetmock.update.called_with(active=False) querysetmock.update.called_with(active=False)
class TestMailBoxAdmin(TestCase): class MailBoxAdminTest(TestCase):
def setUp(self): def setUp(self):
site = AdminSite() site = AdminSite()
self.mbadmin = MailboxAdmin(Mailbox, site) self.mbadmin = MailboxAdmin(Mailbox, site)
@ -183,7 +183,7 @@ class TestMailBoxAdmin(TestCase):
self.assertIsNotNone(admin_url) self.assertIsNotNone(admin_url)
class TestMailAddressAdmin(TestCase): class MailAddressAdminTest(TestCase):
def test_admin_for_mailaddress(self): def test_admin_for_mailaddress(self):
admin_url = reverse('admin:managemails_mailaddress_changelist') admin_url = reverse('admin:managemails_mailaddress_changelist')
self.assertIsNotNone(admin_url) self.assertIsNotNone(admin_url)