def test_user(self):
     a = User(username="******", password="******", name="ray", detail="")
     b = User(username="******", password="******", name="ray", detail="")
     s = [a, b]
     c = User(username="******",
              password="******",
              name="ray",
              detail="1);DROP TABLE if exists USER--")
     self.assertTrue(user_db.insert_users_table(s))
     self.assertTrue(user_db.insert_user_table(c))
     user_db.drop_user_table()
     user_db.init_user_table()
     s.append(c)
     self.assertTrue(user_db.insert_users_table(s))
     self.assertFalse(
         user_db.delete_user_table2("1);DROP TABLE if exists USER--"))
     self.assertTrue(user_db.update_user_table(1, c))
     self.assertEqual(
         user_db.select_user_name("1ray);DROP TABLE if exists USER--"),
         None)
     self.assertEqual(
         user_db.select_password("1ray",
                                 "sss);DROP TABLE if exists USER--"), None)
     self.assertEqual(
         user_db.select_user("1ray", "sss);DROP TABLE if exists USER--"),
         None)
 def test_selectusername3(self):
     self.assertEqual(user_db.select_user_name(None), None)
 def test_selectusername2(self):
     a = User(username="******", password="******", name="ray", detail="")
     b = User(username="******", password="******", name="ray", detail="")
     s = [a, b]
     user_db.insert_users_table(s)
     self.assertEqual(user_db.select_user_name("ray"), None)