示例#1
0
 def test_admin_set_line_manager_not_exist(self):
     url = reverse('profile-set-line-manager',
                   kwargs={'pk': self.user_profile.id})
     temp_user = UserFactory.build(
     )  # this have not saved to test database yet
     temp_user_profile = ProfileFactory.build(user=temp_user)
     data = {'name': f'{temp_user_profile.name}'}
     response = self.client.post(url, data)
     self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
示例#2
0
 def test_user_get_invalid_contact(self):
     temp_user = UserFactory.build()
     url = reverse('contact-detail', kwargs={'pk': temp_user.id})
     response = self.client.get(url)
     self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)