Ejemplo n.º 1
0
    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()
Ejemplo n.º 2
0
    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() == ''
Ejemplo n.º 3
0
    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'))
Ejemplo n.º 4
0
    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('*****@*****.**')
Ejemplo n.º 5
0
    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)
Ejemplo n.º 6
0
 def setup_method(self, m):
     self.cx = uts.resetDB()
     self.cu = self.cx.cursor()
     uts.resetMail()
Ejemplo n.º 7
0
 def setup_method(self, method):
     uts.resetDB()
     uts.resetMail()
     self.db = core.Service('http://localhost:7707', debug=True)
     self.db.startService()