Skip to content

Commit

Permalink
add test for homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Mar 24, 2016
1 parent 26026b7 commit 75cdd3e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
def test():
local("./manage.py test test")
# local("git add -p && git commit")
# local("git push")
# local("git push")
File renamed without changes.
21 changes: 21 additions & 0 deletions test/test_homepage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from django.test import LiveServerTestCase
from django.contrib.auth.models import User

from selenium import webdriver

class HomepageTestCase(LiveServerTestCase):
def setUp(self):
self.selenium = webdriver.Firefox()
self.selenium.maximize_window()
super(HomepageTestCase, self).setUp()

def tearDown(self):
self.selenium.quit()
super(HomepageTestCase, self).tearDown()

def test_create_user(self):
self.selenium.get(
'%s%s' % (self.live_server_url, "/")
)

self.assertIn("Welcome to my blog", self.selenium.title)

0 comments on commit 75cdd3e

Please sign in to comment.