示例#1
0
文件: tests.py 项目: ryaninhust/Quan
 def test_post(self):
     headers = {'Authorization': '930b5250fb9e23c32e8b9357d8334aa3e373ff7a'}
     json_content = {'content': 'this is the first f**k'}
     response = requests.post(self.test_url, headers=headers,
                              data=json.dumps(json_content))
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.json()['content'], 'this is the first f**k')
示例#2
0
文件: tests.py 项目: ryaninhust/Quan
 def test_post(self):
     headers = {'Authorization': '930b5250fb9e23c32e8b9357d8334aa3e373ff7a'}
     json_content = {'name': 'f*****g girl', 'description': 'f*****g girl'}
     response = requests.post(self.test_url, data=json.dumps(json_content),
                              headers=headers)
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.json()['name'], 'f*****g girl')
示例#3
0
文件: tests.py 项目: MinjunHuang/Quan
 def test_post(self):
     headers = {'Authorization': '930b5250fb9e23c32e8b9357d8334aa3e373ff7a'}
     json_content = {'content': 'this is the first f**k'}
     response = requests.post(self.test_url,
                              headers=headers,
                              data=json.dumps(json_content))
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.json()['content'], 'this is the first f**k')
示例#4
0
文件: tests.py 项目: MinjunHuang/Quan
 def test_post(self):
     headers = {'Authorization': '930b5250fb9e23c32e8b9357d8334aa3e373ff7a'}
     json_content = {'name': 'f*****g girl', 'description': 'f*****g girl'}
     response = requests.post(self.test_url,
                              data=json.dumps(json_content),
                              headers=headers)
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.json()['name'], 'f*****g girl')
示例#5
0
文件: tests.py 项目: ryaninhust/Quan
 def test_post(self):
     headers = {'authorization': '930b5250fb9e23c32e8b9357d8334aa3e373ff7a'}
     json_content = {'member_id': 2}
     response = requests.post(self.test_url, headers=headers,
                              data=json.dumps(json_content))
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.json()['member_id'], 2)
     self.assertEqual(response.json()['status'], 1)
示例#6
0
文件: tests.py 项目: MinjunHuang/Quan
 def test_post(self):
     headers = {'authorization': '930b5250fb9e23c32e8b9357d8334aa3e373ff7a'}
     json_content = {'member_id': 2}
     response = requests.post(self.test_url,
                              headers=headers,
                              data=json.dumps(json_content))
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.json()['member_id'], 2)
     self.assertEqual(response.json()['status'], 1)
示例#7
0
文件: tests.py 项目: MinjunHuang/Quan
 def test_post(self):
     json_content = {'cell_phone': 13667148902, 'password': '******'}
     response = requests.post(self.test_url, data=json.dumps(json_content))
     self.assertEqual(response.status_code, 200)
     self.assertIn('access_token', response.json().keys())
     self.assertIn('url', response.json().keys())
示例#8
0
文件: tests.py 项目: MinjunHuang/Quan
 def test_post(self):
     json_content = {'user_id': 1, 'content': 'hehe'}
     response = requests.post(self.test_url, data=json.dumps(json_content))
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.json()['content'], 'hehe')
示例#9
0
文件: tests.py 项目: MinjunHuang/Quan
 def test_post(self):
     json_content = {'cell_phone': 13667148901, 'password': '******'}
     response = requests.post(self.test_url, data=json.dumps(json_content))
     self.assertEqual(response.status_code, 200)
示例#10
0
文件: tests.py 项目: ryaninhust/Quan
 def test_post(self):
     json_content = {'cell_phone': 13667148902, 'password': '******'}
     response = requests.post(self.test_url, data=json.dumps(json_content))
     self.assertEqual(response.status_code, 200)
     self.assertIn('access_token', response.json().keys())
     self.assertIn('url', response.json().keys())
示例#11
0
文件: tests.py 项目: ryaninhust/Quan
 def test_post(self):
     json_content = {'user_id': 1, 'content': 'hehe'}
     response = requests.post(self.test_url, data=json.dumps(json_content))
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.json()['content'], 'hehe')
示例#12
0
文件: tests.py 项目: ryaninhust/Quan
 def test_post(self):
     json_content = {'cell_phone': 13667148901, 'password': '******'}
     response = requests.post(self.test_url, data=json.dumps(json_content))
     self.assertEqual(response.status_code, 200)