Improved TestRecordsetNegative

Added a parent to the class and hardcoded the zone id and name in one of the tests.

Change-Id: I8f973e52561d4644821148690430be4c0c1944c0
This commit is contained in:
Eric Wehrmeister 2016-03-04 11:53:08 -06:00
parent 900d82deda
commit 319a331e51

View File

@ -102,11 +102,12 @@ class TestRecordset(BaseDesignateTest):
self.assertEqual(rset.ttl, 'None')
class TestRecordsetNegative(object):
class TestRecordsetNegative(BaseDesignateTest):
def test_invalid_option_on_recordset_create(self):
cmd = 'recordset create {0} aaa.{1} --type A --records 1.2.3.4 ' \
'--invalid "not valid"'.format(self.zone.id, self.zone.name)
cmd = 'recordset create de47d30b-41c5-4e38-b2c5-e0b908e19ec7 ' \
'aaa.desig.com. --type A --records 1.2.3.4 ' \
'--invalid "not valid"'
self.assertRaises(CommandFailed, self.clients.openstack, cmd)
def test_invalid_recordset_command(self):