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
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ testproject/htmlcov/
testproject/rosetta.db
testproject/src/
testproject/.coverage
venv_*
.venv_*
2 changes: 2 additions & 0 deletions rosetta/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.conf import settings
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse, resolve
from django.core.cache import cache
from django.template.defaultfilters import floatformat
from django.test import TestCase
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):
settings.LANGUAGES = (('fr', 'French'), ('xx', 'Dummy Language'),)
cache.delete('rosetta_django_paths')
self.client.get(reverse('rosetta-pick-file') + '?filter=third-party')
r = self.client.get(reverse('rosetta-pick-file'))
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
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
#!/bin/bash

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



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

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

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

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

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

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

0 comments on commit 860e69a

Please sign in to comment.