diff options
Diffstat (limited to 'ishtar_common/tests.py')
| -rw-r--r-- | ishtar_common/tests.py | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index b779af221..5add2e2cf 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -140,6 +140,20 @@ class WizardTest(object):          self.post_wizard() +class CacheTest(TestCase): +    def testAdd(self): +        cached = models.OrganizationType.get_cache('test') +        self.assertEqual(cached, None) +        orga = models.OrganizationType.objects.create( +            txt_idx='test', label='testy') +        cached = models.OrganizationType.get_cache('test') +        self.assertEqual(cached.pk, orga.pk) +        orga.txt_idx = 'testy' +        orga.save() +        cached = models.OrganizationType.get_cache('testy') +        self.assertEqual(cached.pk, orga.pk) + +  class MergeTest(TestCase):      def setUp(self):          self.user, created = User.objects.get_or_create(username='username') | 
