当前位置: 首页>>代码示例>>Python>>正文


Python BaseTest.setUp方法代码示例

本文整理汇总了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 = []
开发者ID:rammstein,项目名称:0install,代码行数:28,代码来源:testdownload.py

示例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()
开发者ID:dabrahams,项目名称:0install,代码行数:9,代码来源:testdriver.py

示例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)
开发者ID:pombredanne,项目名称:0install,代码行数:10,代码来源:testgpg.py

示例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)
开发者ID:pombredanne,项目名称:zero-install,代码行数:11,代码来源:testgpg.py

示例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)
开发者ID:AlexanderRyzhko,项目名称:0install-TUF,代码行数:12,代码来源:teststore.py

示例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()
开发者ID:vittyvk,项目名称:mangonel,代码行数:14,代码来源:test_Organizations.py

示例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 = []
开发者ID:pombredanne,项目名称:zero-install,代码行数:15,代码来源:testdownload.py

示例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 = []
开发者ID:dabrahams,项目名称:zeroinstall,代码行数:17,代码来源:testdownload.py

示例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()
开发者ID:vittyvk,项目名称:mangonel,代码行数:18,代码来源:test_ActivationKeys.py

示例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()
开发者ID:sthirugn,项目名称:mangonel,代码行数:20,代码来源:test_HealAll.py

示例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()
开发者ID:vittyvk,项目名称:mangonel,代码行数:21,代码来源:test_Stress.py

示例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
开发者ID:dabrahams,项目名称:0install,代码行数:24,代码来源:testdownload.py

示例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()
开发者ID:vittyvk,项目名称:mangonel,代码行数:24,代码来源:test_Populate.py

示例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()
开发者ID:b1ca,项目名称:doorhan_directory_autotests,代码行数:7,代码来源:tests_services.py

示例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')
开发者ID:turtledb,项目名称:0install,代码行数:5,代码来源:testdistro.py


注:本文中的basetest.BaseTest.setUp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。