class TestHomePage(unittest.TestCase):

    @classmethod
    def setUpClass(self):
        self.guide = WebGuide()
        self.test_database = DatabaseConfiguration()
        self.test_database.setup()
        self.home_page = HomePage(self.guide)

    @classmethod
    def tearDownClass(self):
        self.guide.close()
        self.test_database.tear_down()


    def test_page_guest_header(self):

        self.assertFalse(self.home_page.header.create_post_available())
        self.assertTrue(self.home_page.header.login_available())
        self.assertTrue(self.home_page.header.signup_available())

    def test_home_page_layout(self):

        self.assertEqual(self.home_page.number_of_entries(), 5)

        self.assertTrue(self.home_page.entries_have_proper_fields())
 def setUpClass(self):
     self.guide = WebGuide()
     self.test_database = DatabaseConfiguration()
     self.test_database.setup()
     self.home_page = HomePage(self.guide)