Convert to use CircleCI and run tests against Django 2.1/Python 3.7

This commit is contained in:
Swen Kooij
2019-01-11 14:37:03 +02:00
parent acf8867974
commit b2f50ec82b
13 changed files with 135 additions and 51 deletions

View File

@@ -33,7 +33,6 @@ class LocalizedFieldTestCase(TestCase):
field = LocalizedField(required=False)
assert field.required == []
@staticmethod
def test_from_db_value():
"""Tests whether the :see:from_db_value function

View File

@@ -40,7 +40,6 @@ class LocalizedFieldFormTestCase(TestCase):
for field in form.fields:
assert not field.required
@staticmethod
def test_compress():
"""Tests whether the :see:compress function

View File

@@ -4,7 +4,6 @@ from django.conf import settings
from django.db import connection
from django.utils import translation
from localized_fields.value import LocalizedIntegerValue
from localized_fields.fields import LocalizedIntegerField
from .fake_model import get_fake_model
@@ -149,7 +148,7 @@ class LocalizedIntegerFieldTestCase(TestCase):
with connection.cursor() as cursor:
table_name = self.TestModel._meta.db_table
cursor.execute("update %s set score = 'en=>haha'" % table_name);
cursor.execute("update %s set score = 'en=>haha'" % table_name)
obj.refresh_from_db()
assert obj.score.get(settings.LANGUAGE_CODE) is None

View File

@@ -1,6 +1,4 @@
from django.conf import settings
from django.test import TestCase
from django.utils import translation
from localized_fields.fields import LocalizedField

View File

@@ -152,7 +152,7 @@ class LocalizedValueTestCase(TestCase):
# with no value, we always expect it to return None
localized_value = LocalizedValue()
assert localized_value.translate() == None
assert localized_value.translate() is None
assert str(localized_value) == ''
# with no value for the default language, the default
@@ -164,7 +164,7 @@ class LocalizedValueTestCase(TestCase):
})
translation.activate(settings.LANGUAGE_CODE)
assert localized_value.translate() == None
assert localized_value.translate() is None
assert str(localized_value) == ''
@staticmethod