Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Append skipped new test : load many assets (fail currently) #110

Closed
wants to merge 1 commit into from

3 participants

@harobed

New test, this test fail. It's skipped currently.

@ronnix

Thanks Stéphane !

@jeanphix
Owner

Merged and fixed by this commit 3044c63

@jeanphix jeanphix closed this
@harobed

Great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 39 additions and 0 deletions.
  1. +19 −0 tests/app.py
  2. +5 −0 tests/run.py
  3. +15 −0 tests/templates/many_assets.html
View
19 tests/app.py
@@ -132,11 +132,30 @@ def url_hash_header():
response.headers['Location'] = url_for('url_hash_header_redirect') + "#/"
return response
+
@app.route('/url-hash-header-redirect/')
def url_hash_header_redirect():
return "Welcome."
+@app.route('/many-assets')
+def many_assets():
+ return render_template(
+ 'many_assets.html',
+ css=['css%s' % i for i in range(0, 5)],
+ js=['js%s' % i for i in range(0, 5)]
+ )
+
+
+@app.route('/js/<name>.js')
+def js_assets(name=None):
+ return 'var foo = "%s";' % name
+
+
+@app.route('/css/<name>.css')
+def css_assets(name=None):
+ return 'P.%s { color: red; };' % name
+
if __name__ == '__main__':
app.run()
View
5 tests/run.py
@@ -342,5 +342,10 @@ def test_url_with_hash_header(self):
self.assertIsNotNone(page)
self.assertTrue("Welcome" in self.ghost.content)
+ @unittest.skip("This test fail")
+ def test_many_assets(self):
+ page, resources = self.ghost.open("%smany-assets" % base_url)
+ page, resources = self.ghost.open("%smany-assets" % base_url)
+
if __name__ == '__main__':
unittest.main()
View
15 tests/templates/many_assets.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+
+ {% for f in js %}
+ <script src="/js/{{ f }}.js" type="text/javascript"></script>
+ {% endfor %}
+ {% for f in css %}
+ <link rel="stylesheet" href="/css/{{ f }}.css" type="text/css" media="screen" charset="utf-8"></link>
+ {% endfor %}
+ </head>
+ <body>
+ <h1>Many assets</h1>
+ </body>
+</html>
Something went wrong with that request. Please try again.