TestAppNestedTests   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A test_registration() 0 2 1
A test_not_installed() 0 3 1
1
from django.core.exceptions import ImproperlyConfigured
2
3
from actstream.registry import register, registry
4
from actstream.tests.base import ActivityBaseTestCase
5
6
from testapp_nested.models import my_model
7
8
9
class TestAppNestedTests(ActivityBaseTestCase):
10
11
    def test_registration(self):
12
        self.assertIn(my_model.NestedModel, registry)
13
14
    def test_not_installed(self):
15
        from notinstalled.models import NotInstalledModel
16
        self.assertRaises(ImproperlyConfigured, register, NotInstalledModel)
17