1
Fork 0

fix tests

This commit is contained in:
Jake Howard 2016-10-08 20:37:55 +01:00
parent 36565ea168
commit 3941e1a5cd
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 5 additions and 1 deletions

View file

@ -11,6 +11,8 @@ class TestClient:
content = "".join(open(file_path).readlines())
if path.endswith('html'):
content = BeautifulSoup(content, 'html.parser')
for script in content(["noscript"]): # Remove extra tags
script.extract()
return content
def build_path(self, path):

View file

@ -27,6 +27,8 @@ class CorePagesTestCase(TestCase):
def test_has_scripts(self):
content = self.client.get('index.html')
for script in content.find_all('script'):
if script.attrs.get('id') == 'piwik':
continue
self.client.exists(script.attrs['src'])
def test_has_stylesheet(self):

View file

@ -1,6 +1,6 @@
{% if BUILD_PRODUCTION %}
<!-- Piwik -->
<script type="text/javascript">
<script type="text/javascript" id="piwik">
var _paq = _paq || [];
_paq.push(["setDomains", ["*.theorangeone.net"]]);
_paq.push(['trackPageView']);