Merge branch 'feature/complete_osusers_test_coverage'

This commit is contained in:
Jan Dittberner 2014-06-01 23:25:09 +02:00
commit ae65cdc100
3 changed files with 23 additions and 4 deletions

View file

@ -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

View 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'))

View file

@ -1,3 +0,0 @@
from django.shortcuts import render
# Create your views here.