Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class EventViewSetTestCase(APITestCase):
- def setUp(self) -> None:
- self.user = User.objects.create_user(username='testadmin', password='adminpass', is_staff=True)
- def test_create_event(self):
- data = {"title": "test_title", "description": "test_description",
- "date": "test_date", "can_be_joined_to": "test_date_2",
- "event_image_link": "http://grafika.pl"}
- response = self.client.post('/api/events/', data)
- self.assertEqual(response.status_code, status.HTTP_201_CREATED)
Add Comment
Please, Sign In to add comment