Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Commit

Permalink
Add unittests for from_instance and to_instance getters
Browse files Browse the repository at this point in the history
  • Loading branch information
thoas committed Dec 4, 2013
1 parent 24b4904 commit e2848bb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sequere/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from sequere import settings
from sequere.registry import registry
from sequere.http import json
from sequere.backends.database.models import Follow


class FixturesMixin(Exam):
Expand Down Expand Up @@ -184,6 +185,16 @@ def setUp(self):

reload(settings)

def test_from_instance_and_to_instance(self):
from ..models import follow

follow(self.user, self.project)

instance = Follow.objects.all()[0]

self.assertEqual(instance.to_instance, self.project)
self.assertEqual(instance.from_instance, self.user)


@override_settings(SEQUERE_BACKEND_CLASS='sequere.backends.redis.RedisBackend')
class RedisBackendTests(BaseBackendTests, TestCase):
Expand Down

0 comments on commit e2848bb

Please sign in to comment.