class NewBlogPostAcceptanceTests(TestCase):

    def setUp(self):
        self.seleniumExecutionContext = SharedSeleniumExecutionContext(SELENIUM_HOST, SELENIUM_PORT, SELENIUM_BROWSER_START_COMMAND, TEST_HOST)
        self.user = SeleniumDrivenUser(self.seleniumExecutionContext)   
    
    @istest
    def ItShouldAllowTheUserToCreateABlogPosAndRedirectHimToAThankYouPage(self):
        self.user.goesTo(BlogLocators.NEW_BLOG_PAGE)\
                 .andThen().fillsOut(BlogLocators.BLOG_TITLE).withThis("Test Driving A Django Application")\
                 .andThen().fillsOut(BlogLocators.BLOG_CONTENT).withThis("It can be done")\
                 .andThen().clicks(BlogLocators.CREATE_BLOG_POST_BUTTON)\
                 .andThen().waitsForPageToLoad()\
                 .andThen().shouldBeOnPage(BlogLocators.THANK_YOU_PAGE)
                 
                
 def setUp(self):
     self.seleniumExecutionContext = SharedSeleniumExecutionContext(SELENIUM_HOST, SELENIUM_PORT, SELENIUM_BROWSER_START_COMMAND, TEST_HOST)
     self.user = SeleniumDrivenUser(self.seleniumExecutionContext)