mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
25 lines
No EOL
681 B
Python
25 lines
No EOL
681 B
Python
import unittest
|
|
from selenium import webdriver
|
|
|
|
|
|
class OnionExplorerTest(unittest.TestCase):
|
|
'''
|
|
based on https://engineering.aweber.com/getting-started-with-ui-automated-tests-using-selenium-python/
|
|
'''
|
|
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
cls.driver = webdriver.Firefox()
|
|
cls.url = 'http://127.0.0.1:8081/'
|
|
|
|
def test_title(self):
|
|
self.driver.get(self.url)
|
|
self.assertEqual(self.driver.title, 'Onion Monero Blockchain Explorer')
|
|
|
|
def test_footer(self):
|
|
self.driver.get(self.url)
|
|
self.assertIn('source code', self.driver.page_source)
|
|
|
|
@classmethod
|
|
def tearDownClass(cls):
|
|
cls.driver.quit() |