Beispiel #1
0
 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')
Beispiel #2
0
 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')
Beispiel #3
0
 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')
Beispiel #4
0
 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')
Beispiel #5
0
 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)
Beispiel #6
0
 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)
Beispiel #7
0
 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())
Beispiel #8
0
 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')
Beispiel #9
0
 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)
Beispiel #10
0
 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())
Beispiel #11
0
 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')
Beispiel #12
0
 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)