forked from ByteInternet/community.hypernode.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestcase.py
More file actions
27 lines (21 loc) · 700 Bytes
/
testcase.py
File metadata and controls
27 lines (21 loc) · 700 Bytes
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
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import subprocess
import unittest
import os
TEST_URL = os.getenv('TEST_URL')
if not TEST_URL:
TEST_URL = subprocess.check_output(
"cd hypernode-vagrant; vagrant ssh-config "
"| grep HostName | awk '{print $NF}'",
shell=True
).strip()
class TestHyperform(unittest.TestCase):
browser = webdriver.PhantomJS()
def setUp(self):
self.addCleanup(self.browser.quit)
def test_title_is_hypernode_docs(self):
self.browser.get("http://" + TEST_URL)
self.assertIn('Hypernode Docs', self.browser.title)
if __name__ == '__main__':
unittest.main(verbosity=2)