Skip to content

Commit

Permalink
clear the django apps cache key prior to testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mbi committed Sep 5, 2013
1 parent 11966cb commit 860e69a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -13,4 +13,4 @@ testproject/htmlcov/
testproject/rosetta.db testproject/rosetta.db
testproject/src/ testproject/src/
testproject/.coverage testproject/.coverage
venv_* .venv_*
2 changes: 2 additions & 0 deletions rosetta/tests/tests.py
Expand Up @@ -2,6 +2,7 @@
from django.conf import settings from django.conf import settings
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.core.urlresolvers import reverse, resolve from django.core.urlresolvers import reverse, resolve
from django.core.cache import cache
from django.template.defaultfilters import floatformat from django.template.defaultfilters import floatformat
from django.test import TestCase from django.test import TestCase
from django.test.client import Client from django.test.client import Client
Expand Down Expand Up @@ -287,6 +288,7 @@ def test_12_issue_82_staff_user(self):


def test_13_catalog_filters(self): def test_13_catalog_filters(self):
settings.LANGUAGES = (('fr', 'French'), ('xx', 'Dummy Language'),) settings.LANGUAGES = (('fr', 'French'), ('xx', 'Dummy Language'),)
cache.delete('rosetta_django_paths')
self.client.get(reverse('rosetta-pick-file') + '?filter=third-party') self.client.get(reverse('rosetta-pick-file') + '?filter=third-party')
r = self.client.get(reverse('rosetta-pick-file')) r = self.client.get(reverse('rosetta-pick-file'))
self.assertTrue(os.path.normpath('rosetta/locale/xx/LC_MESSAGES/django.po') in str(r.content)) self.assertTrue(os.path.normpath('rosetta/locale/xx/LC_MESSAGES/django.po') in str(r.content))
Expand Down
48 changes: 24 additions & 24 deletions runtests_multi_venv.sh
@@ -1,89 +1,89 @@
#!/bin/bash #!/bin/bash


if [ ! -d venv_13 ] if [ ! -d .venv_13 ]
then then
virtualenv --no-site-packages --distribute --python=python2 venv_13 virtualenv --no-site-packages --distribute --python=python2 .venv_13
. venv_13/bin/activate . .venv_13/bin/activate
pip install Django==1.3 coverage python-memcached six microsofttranslator pip install Django==1.3 coverage python-memcached six microsofttranslator
deactivate deactivate
fi fi
if [ ! -d venv_14 ] if [ ! -d .venv_14 ]
then then
virtualenv --no-site-packages --distribute --python=python2 venv_14 virtualenv --no-site-packages --distribute --python=python2 .venv_14
. venv_14/bin/activate . .venv_14/bin/activate
pip install Django==1.4 coverage python-memcached six microsofttranslator pip install Django==1.4 coverage python-memcached six microsofttranslator
deactivate deactivate
fi fi
if [ ! -d venv_15 ] if [ ! -d .venv_15 ]
then then
virtualenv --no-site-packages --distribute --python=python2 venv_15 virtualenv --no-site-packages --distribute --python=python2 .venv_15
. venv_15/bin/activate . .venv_15/bin/activate
pip install Django==1.5 coverage python-memcached six microsofttranslator pip install Django==1.5 coverage python-memcached six microsofttranslator
deactivate deactivate
fi fi
if [ ! -d venv_15_p3 ] if [ ! -d .venv_15_p3 ]
then then
virtualenv --no-site-packages --distribute --python=python3 venv_15_p3 virtualenv --no-site-packages --distribute --python=python3 .venv_15_p3
. venv_15_p3/bin/activate . .venv_15_p3/bin/activate
pip install Django==1.5 coverage python3-memcached six microsofttranslator pip install Django==1.5 coverage python3-memcached six microsofttranslator
deactivate deactivate
fi fi
if [ ! -d venv_16 ] if [ ! -d .venv_16 ]
then then
virtualenv --no-site-packages --distribute --python=python2 venv_16 virtualenv --no-site-packages --distribute --python=python2 .venv_16
. venv_16/bin/activate . .venv_16/bin/activate
pip install https://github.com/django/django/archive/1.6b1.zip pip install https://github.com/django/django/archive/1.6b1.zip
pip install coverage python-memcached six microsofttranslator pip install coverage python-memcached six microsofttranslator
deactivate deactivate
fi fi
if [ ! -d venv_16_p3 ] if [ ! -d .venv_16_p3 ]
then then
virtualenv --no-site-packages --distribute --python=python3 venv_16_p3 virtualenv --no-site-packages --distribute --python=python3 .venv_16_p3
. venv_16_p3/bin/activate . .venv_16_p3/bin/activate
pip install https://github.com/django/django/archive/stable/1.6.x.zip pip install https://github.com/django/django/archive/stable/1.6.x.zip
pip install coverage python3-memcached six microsofttranslator pip install coverage python3-memcached six microsofttranslator
deactivate deactivate
fi fi






. venv_13/bin/activate . .venv_13/bin/activate
cd testproject cd testproject
python manage.py --version python manage.py --version
python manage.py test rosetta python manage.py test rosetta
cd .. cd ..
deactivate deactivate


. venv_14/bin/activate . .venv_14/bin/activate
cd testproject cd testproject
python manage.py --version python manage.py --version
python manage.py test rosetta python manage.py test rosetta
cd .. cd ..
deactivate deactivate


. venv_15/bin/activate . .venv_15/bin/activate
cd testproject cd testproject
python manage.py --version python manage.py --version
python manage.py test rosetta python manage.py test rosetta
cd .. cd ..
deactivate deactivate


. venv_15_p3/bin/activate . .venv_15_p3/bin/activate
cd testproject cd testproject
python manage.py --version python manage.py --version
python --version python --version
python manage.py test rosetta python manage.py test rosetta
cd .. cd ..
deactivate deactivate


. venv_16/bin/activate . .venv_16/bin/activate
cd testproject cd testproject
python manage.py --version python manage.py --version
python manage.py test rosetta python manage.py test rosetta
cd .. cd ..
deactivate deactivate


. venv_16_p3/bin/activate . .venv_16_p3/bin/activate
cd testproject cd testproject
python manage.py --version python manage.py --version
python --version python --version
Expand Down

0 comments on commit 860e69a

Please sign in to comment.