Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed templates tests not using django

  • Loading branch information...
commit 40831937a27d191a6bf88d62b589e5a1a04fb360 1 parent 0b18bc4
@ojii authored
View
1  .gitignore
@@ -11,3 +11,4 @@ tests/parts
tests/.installed.cfg
tests/testproject.db
tests/downloads
+testproject.db
View
3  multilingual/flatpages/models.py
@@ -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):
@@ -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):
View
4 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/')
Please sign in to comment.
Something went wrong with that request. Please try again.