class test_Connectivity_is_page_available(unittest.TestCase):
    def setUp(self):
        ''' '''

        self.environ = Environment()
        self.logdispatcher = LogDispatcher(self.environ)
        self.conn = Connectivity(self.logdispatcher, use_proxy=True)

    def assert_value(self, expected, test_iteration, site, page):
        '''

        :param expected: 
        :param test_iteration: 
        :param site: 
        :param page: 

        '''

        if expected:
            self.assertTrue(
                self.conn.is_site_available(site, page),
                "Could not reach page " + page + " at site " + site)
        else:
            self.assertFalse(self.conn.is_site_available(site, page),
                             "Found page " + page + " at site " + site)
Example #2
0
class test_Connectivity_is_page_available(unittest.TestCase):

    def setUp(self):
        self.environ = Environment()
        self.logdispatcher = LogDispatcher(self.environ)
        self.conn = Connectivity(self.logdispatcher)

    def assert_value(self, expected, test_iteration, site, page):

        if expected:
            self.assertTrue(self.conn.is_site_available(site, page))
        else:
            self.assertFalse(self.conn.is_site_available(site, page))