def setup_method(self, m): self.cx = uts.resetDB() self.cu = self.cx.cursor() uts.resetMail() self.u.open() self.u_list = self.u.createList('Ma nouvelle liste', '*****@*****.**') self.u.openChallenge()
def testNoNeedForEmail(self): """ For an logged user, no need to provide an email """ uts.resetMail() self.u.open('/newlist') self.u.createList('autre liste') assert self.u.location() == uts.url('/autre-liste') assert open('+mailbox').read() == ''
def testReserveAnonyme(self): """ To reserve an item as an anonymous user, you need to ask the identity of the user""" self.a.siteLogout() self.a.open('/liste-b') uts.resetMail() self.a.Reserve() assert self.a.location().startswith(uts.url('/login'))
def test_SendAgain(self): """ It is possible to ask for a second email, possibly changing the email address in the process. """ self.u.open() self.u.siteLogin('*****@*****.**') uts.resetMail() self.u.siteLogin('*****@*****.**') self.u.openChallenge() self.srv = core.Service(uts.url()) self.srv.startService() assert not self.srv.getUserByEmail('*****@*****.**') assert self.srv.getUserByEmail('*****@*****.**')
def setup_method(self, m): # Our initial state is a session with a user owning a list self.srv = core.Service(uts.url()) self.srv.startService() self.cx = uts.resetDB() self.cu = self.cx.cursor() uts.resetMail() self.a_user, self.a_list = self.a.makeUserAndList(self.srv, 'a') self.b_user, self.b_list = self.b.makeUserAndList(self.srv, 'b') self.b.open('/liste-b') self.b.createItem(title='A test', description='blah...', url='http://www/') self.b_item = self.srv.itemsForList(self.b_list)
def setup_method(self, m): self.cx = uts.resetDB() self.cu = self.cx.cursor() uts.resetMail()
def setup_method(self, method): uts.resetDB() uts.resetMail() self.db = core.Service('http://localhost:7707', debug=True) self.db.startService()