Пример #1
0
 def test_parse_igd_profile_service_type(self, igd_profile):
     control_path, upnp_schema = upnp._parse_igd_profile(igd_profile)
     assert control_path == '/upnp/control/wanpppcpppoa'
     assert upnp_schema in (
         'WANPPPConnection',
         'WANIPConnection',
     )
Пример #2
0
 def test_parse_igd_profile_no_schema(self, igd_profile):
     igd_profile = igd_profile.replace('Connection', 'nope')
     with pytest.raises(upnp.IGDError):
         control_path, upnp_schema = upnp._parse_igd_profile(igd_profile)
Пример #3
0
 def test_parse_igd_profile_no_ctrlurl(self, igd_profile):
     igd_profile = igd_profile.replace('controlURL', 'nope')
     with pytest.raises(upnp.IGDError):
         control_path, upnp_schema = upnp._parse_igd_profile(igd_profile)
Пример #4
0
 def test_parse_igd_profile_no_ctrlurl(self, igd_profile):
     igd_profile = igd_profile.replace('controlURL', 'nope')
     with pytest.raises(upnp.IGDError):
         control_path, upnp_schema = upnp._parse_igd_profile(igd_profile)
Пример #5
0
 def test_parse_igd_profile_service_type(self, igd_profile):
     control_path, upnp_schema = upnp._parse_igd_profile(igd_profile)
     assert control_path == '/upnp/control/wanpppcpppoa'
     assert upnp_schema in ('WANPPPConnection', 'WANIPConnection',)
Пример #6
0
 def test_parse_igd_profile_no_schema(self, igd_profile):
     igd_profile = igd_profile.replace('Connection', 'nope')
     with pytest.raises(upnp.IGDError):
         control_path, upnp_schema = upnp._parse_igd_profile(igd_profile)