Exemplo n.º 1
0
class TestFritzDescParser(unittest.TestCase):
    def setUp(self):
        self.fp = FritzDescParser(None, None, filename=DESCRIPTION_FILE)

    def test_modelname(self):
        self.assertEqual(FRITZBOX_MODEL, self.fp.get_modelname())

    def test_getservices(self):
        """
        We get a list of services. Instead of comparing the entire list
        we look at the last item of the first tuple in the list, which
        should be '/any.xml'. If this test passes we assume that this is
        the case for all tuples in the list.
        """
        services = self.fp.get_services()
        self.assertEqual(r'/any.xml', services[0].scpd_url)
Exemplo n.º 2
0
class TestFritzDescParser(unittest.TestCase):

    def setUp(self):
        self.fp = FritzDescParser(None, None, filename=DESCRIPTION_FILE)

    def test_modelname(self):
        self.assertEqual(FRITZBOX_MODEL, self.fp.get_modelname())

    def test_getservices(self):
        """
        We get a list of services. Instead of comparing the entire list
        we look at the last item of the first tuple in the list, which
        should be '/any.xml'. If this test passes we assume that this is
        the case for all tuples in the list.
        """
        services = self.fp.get_services()
        self.assertEqual(r'/any.xml', services[0].scpd_url)
Exemplo n.º 3
0
 def setUp(self):
     self.fp = FritzDescParser(None, None, filename=DESCRIPTION_FILE)
Exemplo n.º 4
0
 def setUp(self):
     self.fp = FritzDescParser(None, None, filename=DESCRIPTION_FILE)