Fix testing
This commit is contained in:
parent
150de8866f
commit
c2b866243d
4 changed files with 12 additions and 8 deletions
|
@ -76,7 +76,6 @@ HELPER_SETTINGS = {
|
|||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
],
|
||||
'MIGRATION_MODULES': {
|
||||
'filer': 'filer.migrations_django',
|
||||
'cmsplugin_filer_image': 'cmsplugin_filer_image.migrations_django',
|
||||
'djangocms_text_ckeditor': 'djangocms_text_ckeditor.migrations_django',
|
||||
},
|
||||
|
|
|
@ -18,6 +18,7 @@ from djangocms_blog.settings import get_setting
|
|||
|
||||
|
||||
from . import BaseTest
|
||||
from djangocms_helper.utils import CMS_30
|
||||
|
||||
|
||||
class AdminTest(BaseTest):
|
||||
|
@ -268,7 +269,10 @@ class ModelsTest(BaseTest):
|
|||
tag = Tag.objects.create(name='tag 1')
|
||||
plugin = add_plugin(post1.content, 'BlogLatestEntriesPlugin', language='en')
|
||||
plugin.tags.add(tag)
|
||||
plugins = list(post1.content.cmsplugin_set.filter(language='en').order_by('tree_id', 'level', 'position'))
|
||||
if CMS_30:
|
||||
plugins = list(post1.content.cmsplugin_set.filter(language='en').order_by('tree_id', 'level', 'position'))
|
||||
else:
|
||||
plugins = list(post1.content.cmsplugin_set.filter(language='en').order_by('path', 'depth', 'position'))
|
||||
copy_plugins_to(plugins, post2.content)
|
||||
new = downcast_plugins(post2.content.cmsplugin_set.all())
|
||||
self.assertEqual(set(new[0].tags.all()), set([tag]))
|
||||
|
@ -297,7 +301,10 @@ class ModelsTest(BaseTest):
|
|||
post2 = self._get_post(self.data['en'][1])
|
||||
plugin = add_plugin(post1.content, 'BlogAuthorPostsPlugin', language='en')
|
||||
plugin.authors.add(self.user)
|
||||
plugins = list(post1.content.cmsplugin_set.filter(language='en').order_by('tree_id', 'level', 'position'))
|
||||
if CMS_30:
|
||||
plugins = list(post1.content.cmsplugin_set.filter(language='en').order_by('tree_id', 'level', 'position'))
|
||||
else:
|
||||
plugins = list(post1.content.cmsplugin_set.filter(language='en').order_by('path', 'depth', 'position'))
|
||||
copy_plugins_to(plugins, post2.content)
|
||||
new = downcast_plugins(post2.content.cmsplugin_set.all())
|
||||
self.assertEqual(set(new[0].authors.all()), set([self.user]))
|
||||
|
|
5
tox.ini
5
tox.ini
|
@ -1,11 +1,12 @@
|
|||
[tox]
|
||||
envlist = py{26}-django{16},py{27,33,34}-django{16,17}
|
||||
envlist = py{26}-django{16}-cms{30,31},py{27,33,34}-django{16,17}-cms{30,31}
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
django16: Django>=1.6,<1.7
|
||||
django17: Django>=1.7,<1.8
|
||||
django17: https://github.com/divio/django-cms/archive/support/3.0.x.zip
|
||||
cms30: https://github.com/divio/django-cms/archive/support/3.0.x.zip
|
||||
cms31: https://github.com/divio/django-cms/archive/develop.zip
|
||||
py26: unittest2
|
||||
py26: django-select2
|
||||
py27: django-select2
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
pip install 'setuptools<8.0' 'pip<6'
|
||||
pip install $@
|
Loading…
Reference in a new issue