Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated Travis CI configuration

  • Loading branch information...
commit cd22150044afb10ff9b9aeeea9285669abbf491e 1 parent bb3a06b
@hvelarde hvelarde authored
View
2  .travis.yml
@@ -2,5 +2,5 @@ language: python
python: "2.7"
install:
- python bootstrap.py -c travis.cfg
- - bin/buildout -c travis.cfg
+ - bin/buildout -c travis.cfg -q
script: bin/test
View
1  README.txt
@@ -49,6 +49,7 @@ Mostly Harmless
---------------
.. image:: https://secure.travis-ci.org/collective/collective.nitf.png
+ :target: http://travis-ci.org/collective/collective.nitf
Have an idea? Found a bug? Let us know by `opening a support ticket`_.
View
20 src/collective/nitf/tests/functional.txt
@@ -17,13 +17,17 @@ Functional test:
>>> 'You are now logged in' in browser.contents
True
- >>> browser.open(portalURL + '/@@nitf-settings')
- >>> 'NITF Settings' in browser.contents
- True
- >>> browser.getControl('Available Sections').value = 'Tommy'
- >>> browser.getControl(name='form.buttons.save').click()
- >>> 'Changes saved' in browser.contents
- True
+Set up the registry:
+
+ >>> from zope.component import getUtility
+ >>> from plone.registry.interfaces import IRegistry
+ >>> from collective.nitf.controlpanel import INITFSettings
+ >>> registry = getUtility(IRegistry)
+ >>> settings = registry.forInterface(INITFSettings)
+ >>> settings.available_sections = set([u'Tommy'])
+ >>> settings.available_genres = [u'Current']
+
+Now, let's create an object:
>>> browser.getLink('Home').click()
>>> browser.getLink('News Article').click()
@@ -32,6 +36,7 @@ Functional test:
>>> browser.getControl('Description').value = 'The Pinball Wizard in a miracle cure!'
>>> browser.getControl('Author').value = 'Newsboy'
>>> browser.getControl(name='form.widgets.text').value = "<p>I'm free<br />I'm free<br />And freedom tastes of reality</p>"
+ >>> open('/tmp/test.html', 'w').write(browser.contents)
>>> browser.getControl('Genre').getControl('Current').selected = True
>>> browser.getControl('Section').getControl('Tommy').selected = True
>>> browser.getControl('Urgency').getControl('Normal').selected = True
@@ -85,3 +90,4 @@ Test views:
>>> 'Miracle Cure' in browser.contents
True
+TODO: test the control panel
View
29 travis.cfg
@@ -1,2 +1,29 @@
[buildout]
-extends = buildout.cfg
+extends =
+ http://svn.plone.org/svn/collective/buildout/plonetest/test-4.x.cfg
+
+parts = test
+
+package-name = collective.nitf
+package-extras = [test]
+test-eggs =
+ Pillow
+ zope.globalrequest
+
+# network speedup
+socket-timeout = 3
+allow-hosts =
+ *.plone.org
+ *.python.org
+ *.zope.org
+ docutils.sourceforge.net
+ effbot.org
+ prdownloads.sourceforge.net
+
+[test]
+eggs =
+ ${buildout:package-name} ${buildout:package-extras}
+ ${buildout:test-eggs}
+
+[versions]
+zc.buildout = 1.6.0
Please sign in to comment.
Something went wrong with that request. Please try again.