Permalink
Browse files

clear the django apps cache key prior to testing

  • Loading branch information...
1 parent 11966cb commit 860e69a68690d55d5263bd51dc5fce726e41f572 @mbi committed Sep 5, 2013
Showing with 27 additions and 25 deletions.
  1. +1 −1 .gitignore
  2. +2 −0 rosetta/tests/tests.py
  3. +24 −24 runtests_multi_venv.sh
View
2 .gitignore
@@ -13,4 +13,4 @@ testproject/htmlcov/
testproject/rosetta.db
testproject/src/
testproject/.coverage
-venv_*
+.venv_*
View
2 rosetta/tests/tests.py
@@ -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
@@ -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))
View
48 runtests_multi_venv.sh
@@ -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

0 comments on commit 860e69a

Please sign in to comment.