def test_create_default(self, mock_interfaces):
        parser = configparser.ConfigParser()
        parser.read_string('''
[section]
interfaces = foo, baz
''')
        check = NetworkBandwidth.create('name', parser['section'])
        assert set(check._interfaces) == {'foo', 'baz'}
        assert check._threshold_send == 100
        assert check._threshold_receive == 100
    def test_create_default(self, _mock_interfaces) -> None:
        parser = configparser.ConfigParser()
        parser.read_string(
            """
[section]
interfaces = foo, baz
"""
        )
        check = NetworkBandwidth.create("name", parser["section"])
        assert set(check._interfaces) == {"foo", "baz"}
        assert check._threshold_send == 100
        assert check._threshold_receive == 100
 def test_create_error(self, _mock_interfaces, config, error_match) -> None:
     parser = configparser.ConfigParser()
     parser.read_string(config)
     with pytest.raises(ConfigurationError, match=error_match):
         NetworkBandwidth.create("name", parser["section"])
 def test_create_error(self, mock_interfaces, config, error_match):
     parser = configparser.ConfigParser()
     parser.read_string(config)
     with pytest.raises(ConfigurationError, match=error_match):
         NetworkBandwidth.create('name', parser['section'])