本文整理匯總了Python中test_factory.Factory.organization方法的典型用法代碼示例。如果您正苦於以下問題:Python Factory.organization方法的具體用法?Python Factory.organization怎麽用?Python Factory.organization使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類test_factory.Factory
的用法示例。
在下文中一共展示了Factory.organization方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_that_requesting_an_invalid_organization_404s
# 需要導入模塊: from test_factory import Factory [as 別名]
# 或者: from test_factory.Factory import organization [as 別名]
def test_that_requesting_an_invalid_organization_404s(self):
sel = self.selenium
self.go_to_the_login_page()
self.log_in()
self.assert_login_succeeded()
# make sure to make a new person
for i in range(0,5):
Factory.organization(account=self.a1)
self.create_new_organization()
# get pk
url = sel.get_location()
url = url[url.find(":%s/" % settings.LIVE_SERVER_PORT)+5:]
a2 = self.create_demo_site("test2")
ua = Factory.useraccount(account=a2)
self.go_to_the_login_page(site="test2")
self.log_in(ua=ua)
self.open(url, site="test2")
assert sel.is_text_present("not found")
示例2: setUp
# 需要導入模塊: from test_factory import Factory [as 別名]
# 或者: from test_factory.Factory import organization [as 別名]
def setUp(self, *args, **kwargs):
self.account = self.setup_for_logged_in()
self.organizations = [Factory.organization(self.account) for i in range(1,Factory.rand_int(30,300))]
self.verificationErrors = []