def test_get_next_user_id(self): #there should be 1 user initially assert meeplib._get_next_user_id() == 1 user = meeplib.User('admin', 'admin') user.insertIntoDB() #there should be 2 users now assert meeplib._get_next_user_id() == 2
def test_reset(self): #there should be 1 user and 1 message initially assert meeplib._get_next_message_id() == 1 assert meeplib._get_next_user_id() == 1 meeplib._reset() assert meeplib._get_next_message_id() == 0 assert meeplib._get_next_user_id() == 0
def IDTEST(self, environ, start_response): print environ['wsgi.input'] form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) # id = int(form['id'].value) # print id, ' A'; meeplib._get_next_user_id() headers = [('Content-type', 'text/html')] headers.append(('Location', '/')) start_response("302 Found", headers) return ["message deleted"]
def IDTEST (self, environ, start_response): print environ['wsgi.input'] form = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ) # id = int(form['id'].value) # print id, ' A'; meeplib._get_next_user_id() headers = [('Content-type', 'text/html')] headers.append(('Location', '/')) start_response("302 Found", headers) return ["message deleted"]
def test_get_next_user(self): x = meeplib._get_next_user_id() assert x != None
def test_get_user_id(self): assert type(meeplib._get_next_user_id()) == int
def test_get_next_user(self): id = meeplib._get_next_user_id() assert id != None meeplib._reset()
def test_get_next_user_id(self): x = meeplib._get_next_user_id() assert type(x) == int
def test_new_user_good_version(self): x1 = meeplib._get_next_user_id()