コード例 #1
0
ファイル: test.py プロジェクト: conrad784/fritzconnection
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)
コード例 #2
0
ファイル: test.py プロジェクト: DerFu/fritzconnection
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)
コード例 #3
0
ファイル: test.py プロジェクト: conrad784/fritzconnection
 def setUp(self):
     self.fp = FritzDescParser(None, None, filename=DESCRIPTION_FILE)
コード例 #4
0
ファイル: test.py プロジェクト: DerFu/fritzconnection
 def setUp(self):
     self.fp = FritzDescParser(None, None, filename=DESCRIPTION_FILE)