Merge branch 'feature/complete_osusers_test_coverage'
This commit is contained in:
commit
ae65cdc100
3 changed files with 23 additions and 4 deletions
|
@ -1,9 +1,9 @@
|
||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
* :feature:`-` full test suite for osusers
|
||||||
* :feature:`-` full test suite for managemails app
|
* :feature:`-` full test suite for managemails app
|
||||||
* :feature:`-` full test suite for domains app
|
* :feature:`-` full test suite for domains app
|
||||||
* :feature:`-` full test suite for osusers.models
|
|
||||||
* :feature:`-` `Celery <http://www.celeryproject.com/>`_ integration for ldap
|
* :feature:`-` `Celery <http://www.celeryproject.com/>`_ integration for ldap
|
||||||
synchronization
|
synchronization
|
||||||
|
|
||||||
|
|
22
gnuviechadmin/osusers/tests/test_tasks.py
Normal file
22
gnuviechadmin/osusers/tests/test_tasks.py
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
from osusers.tasks import LdapRouter
|
||||||
|
|
||||||
|
|
||||||
|
class LdapRouterTest(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.router = LdapRouter()
|
||||||
|
super(LdapRouterTest, self).setUp()
|
||||||
|
|
||||||
|
def test_ldap_tasks_are_routed_to_ldap_queue(self):
|
||||||
|
route = self.router.route_for_task(
|
||||||
|
'some_ldap_task')
|
||||||
|
self.assertEqual(
|
||||||
|
route,
|
||||||
|
{'exchange': 'ldap',
|
||||||
|
'exchange_type': 'direct',
|
||||||
|
'queue': 'ldap'})
|
||||||
|
|
||||||
|
def test_non_ldap_tasks_are_routed_to_default(self):
|
||||||
|
self.assertIsNone(
|
||||||
|
self.router.route_for_task('other'))
|
|
@ -1,3 +0,0 @@
|
||||||
from django.shortcuts import render
|
|
||||||
|
|
||||||
# Create your views here.
|
|
Loading…
Reference in a new issue