From 016414cb946ec9d6f0db06c14bc1231bf3ba0f7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BE=D0=BD=D1=8F=20C=D0=B0=D0=B2=D0=BA=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0?= Date: Sat, 21 Dec 2024 14:59:31 +0200 Subject: [PATCH] solution --- cinema/serializers.py | 2 +- cinema/tests/test_movie_api.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cinema/serializers.py b/cinema/serializers.py index 4e2e8cb9..bdf0f047 100644 --- a/cinema/serializers.py +++ b/cinema/serializers.py @@ -105,7 +105,7 @@ class Meta: fields = ("id", "row", "seat", "movie_session") def validate(self, data): - data = super(TicketSerializer).validate(data) + data = super().validate(data) ticket = Ticket( movie_session=data.get("movie_session"), row=data.get("row"), diff --git a/cinema/tests/test_movie_api.py b/cinema/tests/test_movie_api.py index c1cee2c2..958c09a1 100644 --- a/cinema/tests/test_movie_api.py +++ b/cinema/tests/test_movie_api.py @@ -63,7 +63,6 @@ def test_get_movies_with_actors_filtering(self): def test_get_movies_with_title_filtering(self): movies = self.client.get(f"/api/cinema/movies/?title=ita") - print("Response data:", movies.data) self.assertEqual(len(movies.data), 1) movies = self.client.get(f"/api/cinema/movies/?title=ati") self.assertEqual(len(movies.data), 0)