def test_standby_control(strip_whitespace): cmd = 'xConfiguration Standby Control: On' xapi = """ <Configuration> <Standby> <Control>On</Control> </Standby> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_conf_ipstack(strip_whitespace): cmd = 'xConfiguration Conference 1 CallProtocolIPStack: IPv4' xapi = """ <Configuration> <Conference item="1"> <CallProtocolIPStack>IPv4</CallProtocolIPStack> </Conference> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_standby_delay(strip_whitespace): cmd = 'xConfiguration Standby Delay: 3' xapi = """ <Configuration> <Standby> <Delay>3</Delay> </Standby> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_standby_wakeup_action(strip_whitespace): cmd = 'xConfiguration Standby WakeupAction: DefaultCameraPosition' xapi = """ <Configuration> <Standby> <WakeupAction>DefaultCameraPosition</WakeupAction> </Standby> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_standby_standby_action(strip_whitespace): cmd = 'xConfiguration Standby StandbyAction: PrivacyPosition' xapi = """ <Configuration> <Standby> <StandbyAction>PrivacyPosition</StandbyAction> </Standby> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_time_zone(strip_whitespace): cmd = 'xConfiguration Time Zone: "Europe/Paris"' xapi = """ <Configuration> <Time> <Zone>Europe/Paris</Zone> </Time> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_systemunit_lang(strip_whitespace): cmd = 'xConfiguration SystemUnit MenuLanguage: English' xapi = """ <Configuration> <SystemUnit> <MenuLanguage>English</MenuLanguage> </SystemUnit> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_time_time_format(strip_whitespace): cmd = 'xConfiguration Time TimeFormat: 24H' xapi = """ <Configuration> <Time> <TimeFormat>24H</TimeFormat> </Time> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_time_date_format(strip_whitespace): cmd = 'xConfiguration Time DateFormat: DD_MM_YY' xapi = """ <Configuration> <Time> <DateFormat>DD_MM_YY</DateFormat> </Time> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_ui_user_preferences(strip_whitespace): cmd = 'xConfiguration UserInterface UserPreferences: Off' xapi = """ <Configuration> <UserInterface> <UserPreferences>Off</UserPreferences> </UserInterface> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_provisioning_mode(strip_whitespace): cmd = 'xConfiguration Provisioning Mode: TMS' xapi = """ <Configuration> <Provisioning> <Mode>TMS</Mode> </Provisioning> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_video_default_presentation_source(strip_whitespace): cmd = 'xConfiguration Video DefaultPresentationSource: 2' xapi = """ <Configuration> <Video> <DefaultPresentationSource>2</DefaultPresentationSource> </Video> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_multiple_key_value(strip_whitespace): cmd = 'xCommand Dial Number: "12345" Protocol: H323' xapi = """ <Command> <Dial> <Number>12345</Number> <Protocol>H323</Protocol> </Dial> </Command> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_net_qos_mode(strip_whitespace): cmd = 'xConfiguration Network 1 QoS Mode: Diffserv' xapi = """ <Configuration> <Network item="1"> <QoS> <Mode>Diffserv</Mode> </QoS> </Network> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_provisioning_external_manager_protocol(strip_whitespace): cmd = 'xConfiguration Provisioning ExternalManager Protocol: HTTP' xapi = """ <Configuration> <Provisioning> <ExternalManager> <Protocol>HTTP</Protocol> </ExternalManager> </Provisioning> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_conf_autoanswer_mute(strip_whitespace): cmd = 'xConfiguration Conference 1 AutoAnswer Mute: ON' xapi = """ <Configuration> <Conference item="1"> <AutoAnswer> <Mute>ON</Mute> </AutoAnswer> </Conference> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_ui_touchpanel_default(strip_whitespace): cmd = 'xConfiguration UserInterface TouchPanel DefaultPanel: ContactList' xapi = """ <Configuration> <UserInterface> <TouchPanel> <DefaultPanel>ContactList</DefaultPanel> </TouchPanel> </UserInterface> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_net_8021x_use_cert(strip_whitespace): cmd = 'xConfiguration Network 1 IEEE8021X UseClientCertificate: Off' xapi = """ <Configuration> <Network item="1"> <IEEE8021X> <UseClientCertificate>Off</UseClientCertificate> </IEEE8021X> </Network> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_net_8021x_tls(strip_whitespace): cmd = 'xConfiguration Network 1 IEEE8021X TlsVerify: Off' xapi = """ <Configuration> <Network item="1"> <IEEE8021X> <TlsVerify>Off</TlsVerify> </IEEE8021X> </Network> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_netserv_sip_mode(strip_whitespace): cmd = 'xConfiguration NetworkServices SIP Mode: Off' xapi = """ <Configuration> <NetworkServices> <SIP> <Mode>Off</Mode> </SIP> </NetworkServices> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_netserv_https_mode(strip_whitespace): cmd = 'xConfiguration NetworkServices HTTPS Mode: On' xapi = """ <Configuration> <NetworkServices> <HTTPS> <Mode>On</Mode> </HTTPS> </NetworkServices> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_netserv_ntp_mode(strip_whitespace): cmd = 'xConfiguration NetworkServices NTP Mode: Manual' xapi = """ <Configuration> <NetworkServices> <NTP> <Mode>Manual</Mode> </NTP> </NetworkServices> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_conf_autoanswer_encryption(strip_whitespace): cmd = 'xConfiguration Conference 1 Encryption Mode: BestEffort' xapi = """ <Configuration> <Conference item="1"> <Encryption> <Mode>BestEffort</Mode> </Encryption> </Conference> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_phonebook_server(strip_whitespace): cmd = 'xConfiguration Phonebook Server 1 ID: default' xapi = """ <Configuration> <Phonebook> <Server item="1"> <ID>default</ID> </Server> </Phonebook> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_conf_autoanswer_fecc(strip_whitespace): cmd = 'xConfiguration Conference 1 FarEndControl Mode: OFF' xapi = """ <Configuration> <Conference item="1"> <FarEndControl> <Mode>OFF</Mode> </FarEndControl> </Conference> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_net_ipv4(strip_whitespace): cmd = 'xConfiguration Network 1 IPv4 Assignment: DHCP' xapi = """ <Configuration> <Network item="1"> <IPv4> <Assignment>DHCP</Assignment> </IPv4> </Network> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_conf_call_protocol(strip_whitespace): cmd = 'xConfiguration Conference 1 DefaultCall Protocol: H323' xapi = """ <Configuration> <Conference item="1"> <DefaultCall> <Protocol>H323</Protocol> </DefaultCall> </Conference> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_phonebook_server_type(strip_whitespace): cmd = 'xConfiguration Phonebook Server 1 Type: TMS' xapi = """ <Configuration> <Phonebook> <Server item="1"> <Type>TMS</Type> </Server> </Phonebook> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_conf_call_rate(strip_whitespace): cmd = 'xConfiguration Conference 1 DefaultCall Rate: 1152' xapi = """ <Configuration> <Conference item="1"> <DefaultCall> <Rate>1152</Rate> </DefaultCall> </Conference> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)
def test_provisioning_external_manager_path(strip_whitespace): cmd = 'xConfiguration Provisioning ExternalManager Path: "tms/public/external/management/SystemManagementService.asmx"' # noqa xapi = """ <Configuration> <Provisioning> <ExternalManager> <Path>tms/public/external/management/SystemManagementService.asmx</Path> </ExternalManager> </Provisioning> </Configuration> """ expected = etree.XML(xapi, parser=strip_whitespace) parsed = parse(cmd) assert etree.tostring(expected) == etree.tostring(parsed)