updated tests

This commit is contained in:
Corey Goldberg 2012-11-18 12:42:18 -05:00
parent 2e2f2931a0
commit 94a226e00e
1 changed files with 11 additions and 5 deletions

View File

@ -1,19 +1,25 @@
#!/usr/bin/env python
from selenium import webdriver
from xvfbwrapper import Xvfb
import unittest
from selenium import webdriver
class TestUbuntuHomepage(unittest.TestCase):
class TestHomepages(unittest.TestCase):
def setUp(self):
self.vdisplay = Xvfb(width=1280, height=720)
self.vdisplay.start()
self.browser = webdriver.Firefox()
def testTitle(self):
def testUbuntuHomepage(self):
self.browser.get('http://www.ubuntu.com')
self.assertIn('Ubuntu', self.browser.title)
def testGoogleHomepage(self):
self.browser.get('http://www.google.com')
self.assertIn('Google', self.browser.title)
def tearDown(self):
self.browser.quit()
self.vdisplay.stop()