diff mbox

[3/6] tests: Don't change settings.STATIC_URL in the XML-RPC tests

Message ID 1442938309-3195-4-git-send-email-damien.lespiau@intel.com
State Accepted
Headers show

Commit Message

Damien Lespiau Sept. 22, 2015, 4:11 p.m. UTC
I tracked down a weird bug where the Selenium tests supposed to serve
all static files (.css, .js. ...) weren't doing so when running the
full test suite, but everything was working when running the tests in
isolation.

Turns out one of the other tests was changing settings.STATIC_URL
mid-way without restoring the original value in tearDown() and thus
impacting other tests.

It seems that this change wasn't necessary, the XML-RPC server doesn't
server any static file anyway.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 patchwork/tests/test_xmlrpc.py | 1 -
 1 file changed, 1 deletion(-)

Comments

Stephen Finucane Sept. 22, 2015, 5:24 p.m. UTC | #1
> I tracked down a weird bug where the Selenium tests supposed to serve

> all static files (.css, .js. ...) weren't doing so when running the

> full test suite, but everything was working when running the tests in

> isolation.

> 

> Turns out one of the other tests was changing settings.STATIC_URL

> mid-way without restoring the original value in tearDown() and thus

> impacting other tests.

> 

> It seems that this change wasn't necessary, the XML-RPC server doesn't

> server any static file anyway.

> 

> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>


I think I've also seen this bug (it causes failures with Django 1.6). Glad you identified the issue.

Acked-by: Stephen Finucane <stephen.finucane@intel.com>
diff mbox

Patch

diff --git a/patchwork/tests/test_xmlrpc.py b/patchwork/tests/test_xmlrpc.py
index b7c629e..1aef03c 100644
--- a/patchwork/tests/test_xmlrpc.py
+++ b/patchwork/tests/test_xmlrpc.py
@@ -31,7 +31,6 @@  class XMLRPCTest(LiveServerTestCase):
     fixtures = ['default_states']
 
     def setUp(self):
-        settings.STATIC_URL = '/'
         self.url = (self.live_server_url +
                     reverse('patchwork.views.xmlrpc.xmlrpc'))
         self.rpc = xmlrpclib.Server(self.url)