From 9ff39385c6a2493d9a145ff7f0d8f49c7dff1c95 Mon Sep 17 00:00:00 2001 From: Fred Smith Date: Thu, 7 Apr 2016 14:13:47 -0400 Subject: [PATCH 1/2] clear existing assets before copying new assets --- pavelib/assets.py | 2 +- pavelib/paver_tests/test_servers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pavelib/assets.py b/pavelib/assets.py index 78c249b2df..330b43c9db 100644 --- a/pavelib/assets.py +++ b/pavelib/assets.py @@ -632,7 +632,7 @@ def collect_assets(systems, settings): `settings` is the Django settings module to use. """ for sys in systems: - sh(django_cmd(sys, settings, "collectstatic --noinput > /dev/null")) + sh(django_cmd(sys, settings, "collectstatic --clear --noinput")) print("\t\tFinished collecting {} assets.".format(sys)) diff --git a/pavelib/paver_tests/test_servers.py b/pavelib/paver_tests/test_servers.py index 812dd58d7a..c68cae7fc2 100644 --- a/pavelib/paver_tests/test_servers.py +++ b/pavelib/paver_tests/test_servers.py @@ -27,7 +27,7 @@ EXPECTED_PREPROCESS_ASSETS_COMMAND = ( u" {system}/static/sass/*.scss {system}/static/themed_sass" ) EXPECTED_COLLECT_STATIC_COMMAND = ( - u"python manage.py {system} --settings={asset_settings} collectstatic --noinput > /dev/null" + u"python manage.py {system} --settings={asset_settings} collectstatic --clear --noinput" ) EXPECTED_CELERY_COMMAND = ( u"python manage.py lms --settings={settings} celery worker --beat --loglevel=INFO --pythonpath=." From 36648510172166fdc9476666d3b220765e42a936 Mon Sep 17 00:00:00 2001 From: Fred Smith Date: Fri, 15 Apr 2016 13:11:24 -0400 Subject: [PATCH 2/2] make tests pass by creating staticfiles directories --- test_root/.gitignore | 1 - test_root/staticfiles/cms/.gitkeep | 0 test_root/staticfiles/lms/.gitkeep | 0 3 files changed, 1 deletion(-) create mode 100644 test_root/staticfiles/cms/.gitkeep create mode 100644 test_root/staticfiles/lms/.gitkeep diff --git a/test_root/.gitignore b/test_root/.gitignore index a17bd47875..b3e5512f73 100644 --- a/test_root/.gitignore +++ b/test_root/.gitignore @@ -1,3 +1,2 @@ local_repo remote_repo -staticfiles diff --git a/test_root/staticfiles/cms/.gitkeep b/test_root/staticfiles/cms/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test_root/staticfiles/lms/.gitkeep b/test_root/staticfiles/lms/.gitkeep new file mode 100644 index 0000000000..e69de29bb2