-
Notifications
You must be signed in to change notification settings - Fork 0
/
testRConnection.py
35 lines (25 loc) · 1.09 KB
/
testRConnection.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import platform, unittest
from BaseTest import WorkflowTest, WithFirefox, WithChrome, username
class RunRConnectionTest(WorkflowTest):
def test_workflow(self):
run = self.runUploadedWorkflow('t2flow/Rconnect.t2flow', 'Other')
results = run.waitForFinish(120)
out = results['out']
value = out.getValue()
if out.getMimeType() == 'application/x-error':
self.fail(value)
else:
self.assertEqual(value, '28364')
# Firefox on Windows hangs on click of Workflow Submit button using Selenium, but
# not when running workflow manually
# confirmed on (FF27.0.1, Win7)
@unittest.skipIf(platform.system() == 'Windows', 'Selenium hangs with Firefox on Windows')
@unittest.skipUnless(username, 'No username login provided')
class RunRConnectionTestFirefox(RunRConnectionTest, unittest.TestCase, WithFirefox):
pass
if WithChrome:
@unittest.skipUnless(username, 'No username login provided')
class RunRConnectionTestChrome(RunRConnectionTest, unittest.TestCase, WithChrome):
pass
if __name__ == '__main__':
unittest.main()