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


Python Server.createProject方法代码示例

本文整理汇总了Python中server.Server.createProject方法的典型用法代码示例。如果您正苦于以下问题:Python Server.createProject方法的具体用法?Python Server.createProject怎么用?Python Server.createProject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在server.Server的用法示例。


在下文中一共展示了Server.createProject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUpExecution

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def setUpExecution(self, server, project, client, execution) :
		s = Server(server)
		s.createServer()
		s.createProject(project)
		s.createClient(project, client)
		e = ArgPrepender(s, project, client, execution)
		return e
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:9,代码来源:server_test.py

示例2: test_clientStatus_whenStarted

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_clientStatus_whenStarted(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("myproject")
		s.createClient("myproject", "myclient")
		self.assertEqual(
			s.clientStatus("myproject","myclient"), "NotResponding")
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:9,代码来源:server_test.py

示例3: test_createProject

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_createProject(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("myproject")
		s._assertProjectOk("myproject")
		# no exceptiona
		self.assertFileContent("fixture/myproject/metadata",
			"{}")
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:10,代码来源:server_test.py

示例4: test_clientStatus_afterIdle

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_clientStatus_afterIdle(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("myproject")
		s.createClient("myproject", "myclient")
		s.clientIdle("myproject", "myclient", 30)
		self.assertEqual(
			s.clientStatus("myproject","myclient"), "Idle")
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:10,代码来源:server_test.py

示例5: test_isRunning_withClient_noExecutions

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_isRunning_withClient_noExecutions(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("myproject")
		s.createClient("myproject", "myclient")

		self.assertEqual(
			s.isRunning("myproject","myclient"), False)
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:10,代码来源:server_test.py

示例6: test_assertClientOk_whenAllOk

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_assertClientOk_whenAllOk(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("myproject")
		s.createClient("myproject", "myclient")
		s._assertClientOk("myproject","myclient")
		# no exceptiona
		self.assertFileContent("fixture/myproject/myclient/metadata",
			"{}")
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:11,代码来源:server_test.py

示例7: test_projects

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_projects(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("project1")
		s.createProject("project2")
		self.assertEqual(s.projects(), [
			'project1',
			'project2',
			])
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:11,代码来源:server_test.py

示例8: setUpEmptyClient

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
def setUpEmptyClient(project='myproject', client='myclient', **keyw) :
	s = Server("fixture")
	s.createServer()
	s.createProject(project)
	s.createClient(project,client)
	s.now = datetime.datetime(1900,1,1,0,0,0)
	s.clientIdle(project, client, 0)
	s.setClientMetadata(project,client,**keyw)
	return s
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:11,代码来源:webgenerator_test.py

示例9: test_assertClientOk

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_assertClientOk(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("myproject")
		try :
			s._assertClientOk("myproject","badclient")
			self.fail("Exception expected")
		except ClientNotFound, e:
			self.assertEqual(e.message, "Client not found 'badclient'")
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:11,代码来源:server_test.py

示例10: test_projectMetadata

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_projectMetadata(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("myproject")
		s.setProjectMetadata("myproject", 
			key1 = "value1",
			key2 = [4,3,2],
			)
		self.assertEqual(s.projectMetadata("myproject"),
			{'key1': 'value1', 'key2' : [4,3,2]})
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:12,代码来源:server_test.py

示例11: test_executionStarts_whenBadClient

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_executionStarts_whenBadClient(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("myproject")
		e = ArgPrepender(s, "myproject","badclient","20130301-132313")
		try :
			e.executionStarts(
				timestamp="2013-03-01 13:23:13",
				changelog=[])
			self.fail("Exception expected")
		except ClientNotFound, e:
			self.assertEqual(e.message, "Client not found 'badclient'")
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:14,代码来源:server_test.py

示例12: test_clients

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_clients(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("project1")
		s.createClient("project1","client1-1")
		s.createProject("project2")
		s.createClient("project2","client2-1")
		s.createClient("project2","client2-2")
		self.assertEqual(s.clients("project2"), [
			'client2-1',
			'client2-2',
			])
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:14,代码来源:server_test.py

示例13: test_clientStatus_whenRunning

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_clientStatus_whenRunning(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("myproject")
		s.createClient("myproject", "myclient")

		s.executionStarts(
			"myproject", "myclient", "20130301-132313",
			timestamp="2013-03-01 13:23:13",
			changelog=[])

		self.assertEqual(
			s.clientStatus("myproject","myclient"), "Running")
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:15,代码来源:server_test.py

示例14: test_isRunning_withExecution

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_isRunning_withExecution(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("myproject")
		s.createClient("myproject", "myclient")

		s.executionStarts(
			"myproject", "myclient", "20130301-132313",
			timestamp="2013-03-01 13:23:13",
			changelog=[])

		self.assertEqual(
			s.isRunning("myproject","myclient","20130301-132313"), True)
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:15,代码来源:server_test.py

示例15: test_projectMetadata_updates

# 需要导入模块: from server import Server [as 别名]
# 或者: from server.Server import createProject [as 别名]
	def test_projectMetadata_updates(self) :
		s = Server("fixture")
		s.createServer()
		s.createProject("myproject")
		s.setProjectMetadata("myproject", 
			key1 = "first",
			key2 = [4,3,2],
			)
		s.setProjectMetadata("myproject", 
			key1 = "second",
			key3 = [7,8,9],
			)
		self.assertEqual(s.projectMetadata("myproject"),
			{'key1': 'second', 'key2' : [4,3,2], 'key3' : [7,8,9]})
开发者ID:clam-project,项目名称:testfarm-server2,代码行数:16,代码来源:server_test.py


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