Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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')
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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())
Ejemplo n.º 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')
Ejemplo n.º 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)
Ejemplo n.º 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())
Ejemplo n.º 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')
Ejemplo n.º 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)