Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Making the test not fail with different versions of simplejson.

git-svn-id: http://svn.getwindmill.com/trunk@1224 78c7df6f-8922-0410-bcd3-9426b1ad491b
  • Loading branch information...
commit c993825c3102288a71ed477f08bcd42adae979dd 1 parent 0ea6603
@mikeal mikeal authored
Showing with 17 additions and 5 deletions.
  1. +17 −5 test/python_tests/test_transforms.py
View
22 test/python_tests/test_transforms.py
@@ -43,6 +43,20 @@ def test_suite_name():
client.doubleClick(id=u'hourDiv1-1200')
client.waits.sleep(milliseconds=2000)
client.extensions.cosmoDragDrop(destination={u'id': u'hourDiv4-1300'}, dragged={u'pfx': u'eventDivContent__', u'jsid': u'windmill.testWindow.cosmo.view.cal.canvasInstance.getSelectedItemId()'})"""
+
+other_proper_code = """# Generated by the windmill services transformer
+ from windmill.authoring import WindmillTestClient
+
+def test_suite_name():
+ client = WindmillTestClient(__name__)
+
+ client.click(jsid='{$calView}')
+ client.click(jsid='{$calView}')
+ client.waits.forElement(id='hourDiv1-1200', timeout=40000)
+ client.click(id='viewNavCenterRight')
+ client.doubleClick(id='hourDiv1-1200')
+ client.waits.sleep(milliseconds=2000)
+ client.extensions.cosmoDragDrop(destination={'id': 'hourDiv4-1300'}, dragged={'pfx': 'eventDivContent__', 'jsid': 'windmill.testWindow.cosmo.view.cal.canvasInstance.getSelectedItemId()'})"""
def test_save_to_python():
import windmill
@@ -51,12 +65,10 @@ def test_save_to_python():
file_path = os.path.join(windmill.settings['SAVES_PATH'], file_name)
cleanup_files.append(file_path)
python_code = open(file_path, 'r').read()
- if python_code != proper_python_code:
+ if python_code != proper_python_code or python_code != other_proper_code:
print python_code
- assert python_code == proper_python_code
+ assert python_code == proper_python_code or python_code == other_proper_code
def teardown_module(module):
for f in module.cleanup_files:
- os.remove(f)
-
-
+ os.remove(f)
Please sign in to comment.
Something went wrong with that request. Please try again.