Beispiel #1
0
    def test_non_list_config(self):
        config = {}

        ret = bonjour_announce.validate(config)

        self.assertEqual(ret, (False, 'Configuration for bonjour_announce'
                               ' beacon must be a list.'))
Beispiel #2
0
    def test_empty_config(self):
        config = [{}]

        ret = bonjour_announce.validate(config)

        self.assertEqual(ret, (False, 'Configuration for bonjour_announce'
                               ' beacon must contain servicetype, port'
                               ' and txt items.'))
def test_empty_config():
    config = [{}]

    ret = bonjour_announce.validate(config)
    assert ret == (
        False,
        "Configuration for bonjour_announce beacon must contain servicetype, port and txt items.",
    )
def test_non_list_config():
    config = {}

    ret = bonjour_announce.validate(config)
    assert ret == (False, "Configuration for bonjour_announce beacon must be a list.")