Пример #1
0
 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
Пример #2
0
 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
Пример #3
0
 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
Пример #4
0
 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
Пример #5
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"]
Пример #6
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"]
Пример #7
0
 def test_get_next_user(self):
     x = meeplib._get_next_user_id()
     assert x != None
Пример #8
0
 def test_get_next_user(self):
     x = meeplib._get_next_user_id()
     assert x != None
Пример #9
0
 def test_get_user_id(self):
     assert type(meeplib._get_next_user_id()) == int
Пример #10
0
 def test_get_next_user(self):
     id = meeplib._get_next_user_id()
     assert id != None
     meeplib._reset()
Пример #11
0
 def test_get_next_user_id(self):
     x = meeplib._get_next_user_id()
     assert type(x) == int
Пример #12
0
 def test_get_next_user_id(self):
     x = meeplib._get_next_user_id()
     assert type(x) == int
Пример #13
0
 def test_get_next_user(self):
     id = meeplib._get_next_user_id()
     assert id != None
     meeplib._reset()
Пример #14
0
 def test_new_user_good_version(self):
     x1 = meeplib._get_next_user_id()
Пример #15
0
 def test_new_user_good_version(self):
     x1 = meeplib._get_next_user_id()
Пример #16
0
 def test_get_user_id(self):
     assert type(meeplib._get_next_user_id()) == int