Example #1
0
 def ensure_tld_exists(self, tld='com'):
     if cfg.CONF.testconfig.no_admin_setup:
         return
     try:
         tld_model = TLDModel.from_dict({'name': tld})
         TLDClient.as_user('admin').post_tld(tld_model)
     except exceptions.Conflict:
         pass
Example #2
0
 def ensure_tld_exists(self, tld='com'):
     if cfg.CONF.testconfig.no_admin_setup:
         return
     try:
         tld_model = TLDModel.from_dict({'name': tld})
         TLDClient.as_user('admin').post_tld(tld_model)
     except exceptions.Conflict:
         pass
Example #3
0
 def setUp(self):
     super(TLDTest, self).setUp()
     self.ensure_tld_exists('com')
     self.client = TLDClient.as_user('admin')
     self.fixture = self.useFixture(TLDFixture())
Example #4
0
 def setUp(self):
     super(TLDTest, self).setUp()
     self.ensure_tld_exists('com')
     self.client = TLDClient.as_user('admin')
     self.fixture = self.useFixture(TLDFixture())
Example #5
0
 def _create_tld(self):
     client = TLDClient.as_user(self.user)
     self.post_resp, self.created_tld = client.post_tld(self.post_model)
     assert self.post_resp.status == 201
     self.addCleanup(self.cleanup_tld, client, self.created_tld.id)
Example #6
0
 def _create_tld(self):
     client = TLDClient.as_user(self.user)
     self.post_resp, self.created_tld = client.post_tld(self.post_model)
     assert self.post_resp.status == 201
     self.addCleanup(self.cleanup_tld, client, self.created_tld.id)