Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
janjaapdriessen committed Jan 3, 2011
1 parent da07bdf commit 309ac29
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
12 changes: 8 additions & 4 deletions grokproject/template/buildout.cfg_tmpl
@@ -1,6 +1,5 @@
[buildout]
extends = ${version_info_url}
extends = http://svn.zope.org/repos/main/groktoolkit/trunk/grok.cfg
extends-cache = extends-cache
include-site-packages = ${include_site_packages}
develop = .
Expand Down Expand Up @@ -53,11 +52,16 @@ grokcore.xmlrpc = svn http://svn.zope.org/repos/main/grokcore.xmlrpc/trunk
grokcore.traverser = svn http://svn.zope.org/repos/main/grokcore.traverser/trunk

[versions]
WebOb = 1.0
zope.app.wsgi = 3.10.0
# Override versions here.
# This version pin can be removed after the next groktoolkit release.
collective.recipe.scriptgen = 0.2
WebOb = 1.0
zope.app.wsgi = 3.10.0
martian = 0.14
grokcore.json = 1.1
grokcore.component = 2.2
grokcore.content = 1.1
grokcore.security = 1.5
grokcore.viewlet = 1.8

[app]
recipe = z3c.recipe.scripts
Expand Down
4 changes: 0 additions & 4 deletions grokproject/template/src/+package+/app.txt_tmpl
Expand Up @@ -29,10 +29,6 @@ Check some basic information about the page you visit:
>>> print browser.contents
<html>
<head>
<link rel="stylesheet" type="text/css"
href="http://localhost/fanstatic/${project_lowercase}/style.css" />
<script type="text/javascript"
src="http://localhost/fanstatic/${project_lowercase}/hello.js"></script>
<base href="http://localhost/app/@@index" />
<BLANKLINE>
</head>
Expand Down
Expand Up @@ -7,7 +7,6 @@
<p>Your Grok application is up and running.
Edit <code>${package}/app_templates/index.pt</code> to change
this page.</p>

<img tal:attributes="src static/evencaveman.jpg"/>
</body>
</html>
24 changes: 12 additions & 12 deletions tests_paste.txt
Expand Up @@ -13,13 +13,13 @@ Then use paster. Eggs are placed in our freshly created eggs directory:
>>> executable = [os.path.join(current_dir, 'bin', 'grokproject')]
>>> opts = ['--user=a', '--passwd=a', '--eggs-dir=' + eggsdir]
>>> version = [
... '--version-url=http://grok.zope.org/releaseinfo/1.2b/versions.cfg']
... '--version-url=http://grok.zope.org/releaseinfo/1.2.1/versions.cfg']
>>> sh(executable + opts + version + ['GrokExample'])
['...grokproject',
'--user=a',
'--passwd=a',
'--eggs-dir=...grokproject-test-eggs',
'--version-url=http://grok.zope.org/releaseinfo/1.2b/versions.cfg',
'--version-url=http://grok.zope.org/releaseinfo/1.2.1/versions.cfg',
'GrokExample']...
Creating directory '...bin'.
Creating directory '...parts'.
Expand Down Expand Up @@ -71,7 +71,7 @@ Let's check the contents:
>>> package_dir = os.path.join(testdir, 'GrokExample')
>>> print open(os.path.join(package_dir, 'buildout.cfg')).read()
[buildout]
extends = http://grok.zope.org/releaseinfo/1.2b/versions.cfg
extends = http://grok.zope.org/releaseinfo/1.2.1/versions.cfg
extends-cache = extends-cache
include-site-packages = false
develop = .
Expand Down Expand Up @@ -143,12 +143,12 @@ The eggs dir is filled now:

The extends-cache directive results in cached versions of the referenced
buildout files to support offline building. We know what the filename of the
cached versions file for 1.2b will look like:
cached versions file for 1.2.1 will look like:

>>> ls(os.path.join(package_dir, 'extends-cache'))
0857a87803d0c8a371e867bd7d58a782
1cd99c06b44977edcb9281133f31007b
f74256c0d403a6bb45c38b9ce42c783c
1db36734c0226e6f922ac9bb3361f6d8
286c4c832f552bec68fcac956a6be5c6
2a2cf1415ca2d47decad204083d1482c

The password given is stored SSHA encoded:

Expand Down Expand Up @@ -264,13 +264,13 @@ We can run tests:
>>> print 'Test:\n' + output
Test...
Running tests at level 1
Running grokexample.FanstaticLayer tests:
Set up grokexample.FanstaticLayer in ... seconds.
Running grokexample.ZopeFanstaticBrowserLayer tests:
Set up grokexample.ZopeFanstaticBrowserLayer... in ... seconds.
Running:
...
Ran 3 tests with 0 failures and 0 errors in ... seconds.
.
Ran 1 tests with 0 failures and 0 errors in ... seconds.
Tearing down left over layers:
Tear down grokexample.FanstaticLayer in ... seconds.
Tear down grokexample.ZopeFanstaticBrowserLayer in ... seconds.
<BLANKLINE>

Using the generated `buildout` script
Expand Down

0 comments on commit 309ac29

Please sign in to comment.