class HostgroupTest(TestCase):
    def setUp(self):
        self.api = API()

    def test_create(self):
        self.api.hostgroup_create("test" + TestUtils.random_string(6), ["red", "green", "blue"])

    def test_empty_name(self):
        try:
            self.api.hostgroup_create(None, ["red", "green", "blue"])
        except HTTPResponseError as e:
            pass
示例#2
0
class HostgroupTest(TestCase):
    def setUp(self):
        self.api = API()

    def test_create(self):
        self.api.hostgroup_create('test' + TestUtils.random_string(6),
                                  ['red', 'green', 'blue'])

    def test_empty_name(self):
        try:
            self.api.hostgroup_create(None, ['red', 'green', 'blue'])
        except HTTPResponseError as e:
            pass