예제 #1
0
    def tearDown(self):
        m = meeplib.get_all_messages()[0]
        meeplib.delete_message(m)

        u = meeplib.get_all_users()[0]
        meeplib.delete_user(u)

        assert len(meeplib._messages) == 0
        assert len(meeplib._users) == 0
        assert len(meeplib._user_ids) == 0
예제 #2
0
파일: test_meeplib.py 프로젝트: kgleas/meep
    def tearDown(self):
        m = meeplib.get_all_messages()[0]
        meeplib.delete_message(m)

        u = meeplib.get_all_users()[0]
        meeplib.delete_user(u)

        assert len(meeplib._messages) == 0
        assert len(meeplib._users) == 0
        assert len(meeplib._user_ids) == 0
예제 #3
0
파일: test_meeplib.py 프로젝트: hkb261/meep
    def tearDown(self):
        m = meeplib.get_message(self.msgId)
        if m != None:
            meeplib.delete_message(m)

        l = len(meeplib.get_all_users())
        meeplib.delete_user(meeplib.get_user(self.ux))
        lafter = len(meeplib.get_all_users())

        assert l > lafter
예제 #4
0
파일: test_meeplib.py 프로젝트: hkb261/meep
    def tearDown(self):
        m = meeplib.get_message(self.msgId)
        if m != None:
            meeplib.delete_message(m)
            

        l = len(meeplib.get_all_users())
        meeplib.delete_user(meeplib.get_user(self.ux))
        lafter = len(meeplib.get_all_users())
        
        assert l > lafter
예제 #5
0
    def tearDown(self):
        m = meeplib.get_all_threads()
        z = m[0].get_all_posts('id')
        m[0].delete_post(z[0])

        u = meeplib.get_all_users()[0]
        meeplib.delete_user(u)

        assert len(meeplib._messages) == 0
        assert len(meeplib._users) == 0
        assert len(meeplib._user_ids) == 0
예제 #6
0
    def test_delete_user(self):
        #check that there is 1 user
        assert len(meeplib.get_all_users()) == 1
        assert len(meeplib._user_ids) == 1
        for msg in meeplib._messages.values():
            meeplib.delete_message(msg)
        meeplib.delete_user(meeplib.get_user('foo'))

        #check that there are no users
        assert len(meeplib.get_all_users()) == 0
        assert len(meeplib._user_ids) == 0
예제 #7
0
    def test_delete_user(self):
        #check that there is 1 user
        assert len(meeplib.get_all_users()) == 1
        assert len(meeplib._user_ids) == 1
        for msg in meeplib._messages.values():
            meeplib.delete_message(msg)
        meeplib.delete_user(meeplib.get_user('foo'))
        

        #check that there are no users
        assert len(meeplib.get_all_users()) == 0
        assert len(meeplib._user_ids) == 0
예제 #8
0
 def delete_loggedin_user_action(self, environ, start_response):
     headers = [('Content-type', 'text/html')]
     u = self.getUser(environ)
     if u.username is None:
         start_response("200 OK", headers)
         return ["You must be logged in to delete your user. <p><a href='/login'>Log in</a><p><a href='/'>Show messages</a>"]
     
     meeplib.delete_user(u)
     self.log_user_out(environ, headers)
     
     headers = [('Content-type', 'text/html')]
     start_response("200 OK", headers)
     return ["You have successfully deleted this user."]
예제 #9
0
 def test_tearDown(self):
     print "test teardown"
     users = meeplib.get_all_users()
     for user in users:
         meeplib.delete_user(user)
         print meeplib._user_ids
     messages = meeplib.get_all_messages()
     for m in messages:
         meeplib.delete_message(m)
     print len(meeplib._user_ids)
     assert len(meeplib._messages) == 0
     assert len(meeplib._users) == 0
     assert len(meeplib._user_ids) == 0
     meeplib._reset()
예제 #10
0
    def tearDown(self):
        t = meeplib.get_all_threads()[0]
        m = t.get_all_posts()[0]
        t.delete_post(m)

        u = meeplib.get_all_users()[0]

        v = meeplib.get_all_users()[1]
        meeplib.delete_user(u)
        meeplib.delete_user(v)

        assert len(meeplib._threads) == 0
        assert len(meeplib._users) == 0
        assert len(meeplib._user_ids) == 0
예제 #11
0
    def tearDown(self):
        t = meeplib.get_all_threads()[0]
        m = t.get_all_posts()[0]
        t.delete_post(m)

        u = meeplib.get_all_users()[0]

        v = meeplib.get_all_users()[1]
        meeplib.delete_user(u)
        meeplib.delete_user(v)

        assert len(meeplib._threads) == 0
        assert len(meeplib._users) == 0
        assert len(meeplib._user_ids) == 0
예제 #12
0
 def test_tearDown(self):
     print "test teardown"
     users = meeplib.get_all_users()
     for user in users:
         meeplib.delete_user(user)
         print meeplib._user_ids
     messages = meeplib.get_all_messages()
     for m in messages:
         meeplib.delete_message(m)
     print len(meeplib._user_ids)
     assert len(meeplib._messages) == 0
     assert len(meeplib._users) == 0
     assert len(meeplib._user_ids) == 0
     meeplib._reset()
예제 #13
0
    def delete_loggedin_user_action(self, environ, start_response):
        headers = [('Content-type', 'text/html')]
        u = self.getUser(environ)
        if u.username is None:
            start_response("200 OK", headers)
            return [
                "You must be logged in to delete your user. <p><a href='/login'>Log in</a><p><a href='/'>Show messages</a>"
            ]

        meeplib.delete_user(u)
        self.log_user_out(environ, headers)

        headers = [('Content-type', 'text/html')]
        start_response("200 OK", headers)
        return ["You have successfully deleted this user."]
예제 #14
0
    def tearDown(self):
        u = meeplib.get_all_users()[0]
        meeplib.delete_user(u)

        assert len(meeplib._users) == 0
        assert len(meeplib._user_ids) == 0
예제 #15
0
    def tearDown(self):
        u = meeplib.get_all_users()[0]
        meeplib.delete_user(u)

        assert len(meeplib._users) == 0
        assert len(meeplib._user_ids) == 0