Commit ae33d540bf167c309e25ce1a1db8547cf66e7122

Authored by Lucas Kanashiro
1 parent 0df355e5

plugins: test dispatch without app_label

Signed-off-by: Lucas Kanashiro <kanashiro.duarte@gmail.com>
Signed-off-by: Luiz Oliveira <ziuloliveira@gmail.com>
colab/plugins/tests/__init__.py 0 → 100644
colab/plugins/tests/test_views.py 0 → 100644
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
  1 +from django.test import TestCase
  2 +from django.test.client import RequestFactory
  3 +
  4 +from ..views import ColabProxyView
  5 +from colab.accounts.models import User
  6 +
  7 +
  8 +class ViewsTest(TestCase):
  9 +
  10 + def setUp(self):
  11 + self.view = ColabProxyView()
  12 + self.factory = RequestFactory()
  13 + self.user = User.objects.create_user(
  14 + username='john', email='john@test.org', password='123',
  15 + first_name='John', last_name='John')
  16 +
  17 + def test_dispatch_without_app_label(self):
  18 + request = self.factory.get('/')
  19 + request.user = self.user
  20 +
  21 + with self.assertRaises(NotImplementedError):
  22 + self.view.dispatch(request, '/')