Skip to content

Commit

Permalink
fixed templates tests not using django
Browse files Browse the repository at this point in the history
  • Loading branch information
ojii committed Mar 19, 2010
1 parent 0b18bc4 commit 4083193
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -11,3 +11,4 @@ tests/parts
tests/.installed.cfg
tests/testproject.db
tests/downloads
testproject.db
3 changes: 3 additions & 0 deletions multilingual/flatpages/models.py
Expand Up @@ -3,6 +3,7 @@
from django.utils.translation import ugettext_lazy as _
from multilingual.translation import Translation as TranslationBase
from multilingual.exceptions import TranslationDoesNotExist
from multilingual.manager import MultilingualManager


class MultilingualFlatPage(models.Model):
Expand All @@ -13,6 +14,8 @@ class MultilingualFlatPage(models.Model):
help_text=_("Example: 'flatpages/contact_page.html'. If this isn't provided, the system will use 'flatpages/default.html'."))
registration_required = models.BooleanField(_('registration required'), help_text=_("If this is checked, only logged-in users will be able to view the page."))
sites = models.ManyToManyField(Site)

objects = MultilingualManager()

# And now the translatable fields
class Translation(TranslationBase):
Expand Down
4 changes: 2 additions & 2 deletions tests/testproject/tests/templates.py
@@ -1,8 +1,8 @@
import unittest
from django.test import TestCase
from django.template import Template, Context
from multilingual.flatpages.models import MultilingualFlatPage

class TemplateTestCase(unittest.TestCase):
class TemplateTestCase(TestCase):
fixtures = ['testdata.json']
def test_gll(self):
mfp = MultilingualFlatPage.objects.get(url='/test1/')
Expand Down

0 comments on commit 4083193

Please sign in to comment.