本文整理汇总了Python中basetest.BaseTest.setUp方法的典型用法代码示例。如果您正苦于以下问题:Python BaseTest.setUp方法的具体用法?Python BaseTest.setUp怎么用?Python BaseTest.setUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类basetest.BaseTest
的用法示例。
在下文中一共展示了BaseTest.setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
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 = []
示例2: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
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: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
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)
示例4: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
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)
示例5: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
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)
示例6: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
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()
示例7: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
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 = []
示例8: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
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 = []
示例9: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
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()
示例10: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
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()
示例11: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
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()
示例12: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
def setUp(self):
BaseTest.setUp(self)
background._detach = lambda: False
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 = []
helpers.get_selections_gui = raise_gui
global ran_gui
ran_gui = False
示例13: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
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()
示例14: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
def setUp(self):
BaseTest.setUp(self)
main_page = MainPage(self.driver)
constructor_page = main_page.navigate_cp()
self.item = constructor_page.navigate_service()
示例15: setUp
# 需要导入模块: from basetest import BaseTest [as 别名]
# 或者: from basetest.BaseTest import setUp [as 别名]
def setUp(self):
BaseTest.setUp(self)
self.feed = model.ZeroInstallFeed(empty_feed, local_path = '/empty.xml')