Пример #1
0
 def test_apply_post_success(self):
     client = Client()
     access_token = google_login.test_account_google_account(self)
     header = {"HTTP_AUTHORIZATION": access_token}
     response = client.post('/job/apply?job_id=2&resume_id=1',
                            content_type='applications/json',
                            **header)
     self.assertEqual(response.status_code, 200)
Пример #2
0
 def test_follow_post_success(self):
     client = Client()
     access_token = google_login.test_account_google_account(self)
     header = {"HTTP_AUTHORIZATION": access_token}
     response = client.post('/company/follow?company_id=2',
                            content_type='applications/json',
                            **header)
     self.assertEqual(response.status_code, 200)
Пример #3
0
 def test_bookmark_get_fail(self):
     client = Client()
     access_token = google_login.test_account_google_account(self)
     header = {"HTTP_AUTHORIZATION": access_token}
     response = client.get('/job/bookmark?job_id=100',
                           content_type='applications/json',
                           **header)
     self.assertEqual(response.status_code, 400)
     self.assertEqual(response.json(), {'message': "Invalid Bookmark"})
Пример #4
0
 def test_bookmark_get_success(self):
     client = Client()
     access_token = google_login.test_account_google_account(self)
     header = {"HTTP_AUTHORIZATION": access_token}
     response = client.get('/job/bookmark?job_id=1',
                           content_type='applications/json',
                           **header)
     self.assertEqual(response.status_code, 200)
     self.assertEqual(response.json(), {'is_bookmark': True})
Пример #5
0
 def test_like_post_fail(self):
     client = Client()
     access_token = google_login.test_account_google_account(self)
     header = {"HTTP_AUTHORIZATION": access_token}
     response = client.post('/job/like?job_id=200',
                            content_type='applications/json',
                            **header)
     self.assertEqual(response.status_code, 400)
     self.assertEqual(response.json(),
                      {'message': 'Invalid Account or Job'})
Пример #6
0
 def test_follow_post_fail(self):
     client = Client()
     access_token = google_login.test_account_google_account(self)
     header = {"HTTP_AUTHORIZATION": access_token}
     response = client.post('/company/follow?company_id=1000',
                            content_type='applications/json',
                            **header)
     self.assertEqual(response.status_code, 400)
     self.assertEqual(response.json(),
                      {'message': 'Invalid Account or Company'})