本文整理汇总了Python中basetest.BaseTest类的典型用法代码示例。如果您正苦于以下问题:Python BaseTest类的具体用法?Python BaseTest怎么用?Python BaseTest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BaseTest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tearDown
def tearDown(self):
helpers.get_selections_gui = real_get_selections_gui
BaseTest.tearDown(self)
kill_server_process()
# Flush out ResourceWarnings
import gc; gc.collect()
示例2: setUp
def setUp(self):
BaseTest.setUp(self)
stream = tempfile.TemporaryFile(mode = 'w+b')
stream.write(data.thomas_key)
stream.seek(0)
gpg.import_key(stream)
stream.close()
示例3: tearDown
def tearDown(self):
BaseTest.tearDown(self)
support.ro_rmtree(self.store_parent)
support.ro_rmtree(self.tmp)
cli.stores = None
示例4: setUp
def setUp(self):
BaseTest.setUp(self)
self.config.handler.allow_downloads = True
self.config.key_info_server = 'http://localhost:3333/key-info'
self.config.fetcher = fetch.Fetcher(self.config)
child_config = config.Config()
child_config.key_info_server = 'http://localhost:3333/key-info'
child_config.save_globals()
stream = tempfile.TemporaryFile()
stream.write(data.thomas_key)
stream.seek(0)
gpg.import_key(stream)
stream.close()
trust.trust_db.watchers = []
helpers.get_selections_gui = raise_gui
global ran_gui
ran_gui = False
global traced_downloads
traced_downloads = []
示例5: setUp
def setUp(self):
BaseTest.setUp(self)
with tempfile.TemporaryFile(mode="w+b") as stream:
stream.write(thomas_key)
stream.seek(0)
gpg.import_key(stream)
warnings.filterwarnings("ignore", category=DeprecationWarning)
示例6: setUp
def setUp(self):
BaseTest.setUp(self)
stream = tempfile.TemporaryFile()
stream.write(thomas_key)
stream.seek(0)
gpg.import_key(stream)
trust.trust_db.trust_key(THOMAS_FINGERPRINT)
warnings.filterwarnings("ignore", category = DeprecationWarning)
示例7: setUp
def setUp(self):
BaseTest.setUp(self)
self.store_parent = tempfile.mktemp()
os.mkdir(self.store_parent, 0o700)
self.store = Store(self.store_parent + '/implementations')
os.mkdir(self.store.dir, 0o700)
self.tmp = tempfile.mktemp()
os.mkdir(self.tmp)
示例8: setUp
def setUp(self):
BaseTest.setUp(self)
self.server = Server(host=self.host,
project=self.project,
username=self.user,
password=self.password,
port=self.port)
self.org_api = Organization()
self.env_api = Environment()
self.start_time = time.time()
示例9: tearDown
def tearDown(self):
# Wait for all downloads to finish, otherwise they may interfere with other tests
for dl in list(self.config.handler.monitored_downloads):
try:
tasks.wait_for_blocker(dl.downloaded)
except:
pass
BaseTest.tearDown(self)
kill_server_process()
# Flush out ResourceWarnings
import gc; gc.collect()
示例10: setUp
def setUp(self):
BaseTest.setUp(self)
self.config.handler.allow_downloads = True
self.config.fetcher = fetch.Fetcher(self.config.handler)
stream = tempfile.TemporaryFile()
stream.write(data.thomas_key)
stream.seek(0)
gpg.import_key(stream)
self.child = None
trust.trust_db.watchers = []
示例11: setUp
def setUp(self):
BaseTest.setUp(self)
self.config.handler.allow_downloads = True
self.config.key_info_server = 'http://localhost:3333/key-info'
self.config.fetcher = fetch.Fetcher(self.config)
stream = tempfile.TemporaryFile()
stream.write(data.thomas_key)
stream.seek(0)
gpg.import_key(stream)
stream.close()
trust.trust_db.watchers = []
示例12: setUp
def setUp(self):
BaseTest.setUp(self)
self.server = Server(host=self.host,
project=self.project,
username=self.user,
password=self.password)
self.org_api = Organization()
self.ak_api = ActivationKey()
self.env_api = Environment()
self.prd_api = Product()
self.prv_api = Provider()
self.repo_api = Repository()
self.sys_api = System()
self.start_time = time.time()
示例13: setUp
def setUp(self):
BaseTest.setUp(self)
self.server = Server(host=self.host,
project=self.project,
username=self.user,
password=self.password,
port=self.port)
self.org_api = Organization()
self.env_api = Environment()
self.sys_api = System()
# Include the main options here so test suites may add their own
parser = argparse.ArgumentParser()
parser.add_argument('-dorg', '--org-label', type=str, dest='org_label')
[self.args, ignored_args] = parser.parse_known_args()
self.start_time = time.time()
示例14: setUp
def setUp(self):
BaseTest.setUp(self)
self.server = Server(host=self.host,
project=self.project,
username=self.user,
password=self.password,
port=self.port)
self.org_api = Organization()
self.chs_api = Changeset()
self.cv_api = ContentView()
self.cvd_api = ContentViewDefinition()
self.env_api = Environment()
self.prd_api = Product()
self.prv_api = Provider()
self.repo_api = Repository()
self.sys_api = System()
self.start_time = time.time()
示例15: setUp
def setUp(self):
BaseTest.setUp(self)
self.server = Server(host=self.host,
project=self.project,
username=self.user,
password=self.password,
port=self.port)
self.org_api = Organization()
self.env_api = Environment()
self.sys_api = System()
self.csvload = CSVLoad(self.sys_api, self.org_api, self.env_api)
# Include the main options here so test suites may add their own
parser = argparse.ArgumentParser()
parser.add_argument('-dorg', '--org-csv', type=str, dest='org_csv')
parser.add_argument('-dsys', '--sys-csv', type=str, dest='sys_csv')
parser.add_argument('--no-cleanup', dest='nocleanup' ,action='store_true', help="Do not remove testing org")
parser.set_defaults(nocleanup=False)
[self.args, ignored_args] = parser.parse_known_args()
self.start_time = time.time()