Commits

Ralph Bean committed 2d529e6

Test for success..........

Comments (0)

Files changed (3)

 glob:Thumbs.db
 glob:build/*
 glob:dist/*
+glob:*.egg*
 from setuptools import setup, find_packages
 
+# Hack to get tests to work on py2.7
+import multiprocessing, logging
+
 setup(
     name='tw2.dynforms',
     version='2.0a3',
     zip_safe=False,
     include_package_data=True,
     test_suite = 'nose.collector',
+    tests_require = [
+        'nose',
+        'formencode',
+        'BeautifulSoup',
+        'strainer',
+        'WebTest',
+    ],
     entry_points="""
         [tw2.widgets]
         # Register your widgets so they can be listed in the WidgetBrowser

tests/test_widget.py

-from tw.core.testutil import WidgetTestCase
-from tw.tw2dynforms import *
+from tw2.core.testbase import WidgetTest
+from tw2.dynforms import *
 
-class TestWidget(WidgetTestCase):
-    # place your widget at the TestWidget attribute
-    TestWidget = Tw2dynforms
-    # Initilization args. go here 
-    widget_kw = {}
-
-    def test_render(self):
-        # Asserts 'foo' and 'test' (the test widget's id) appear in rendered 
-        # string when 'foo' is passed as value to render
-        self.assertInOutput(['foo', 'test'], "foo")
-        # Asserts 'ohlalala' does not appear in rendered string when render 
-        # is called without args
-        self.assertNotInOutput(['ohlalala'])
+# TODO -- write tests using WidgetTest