Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions resources/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_people_root(self):

def test_people_schema(self):
self.assertEqual(
self.get_query("/api/people/schema").status_code, 200)
self.get_query("/api/people/schema/").status_code, 200)

def test_people_search(self):
response = self.get_query("/api/people/?search=r2")
Expand All @@ -59,7 +59,7 @@ def test_planets_root(self):

def test_planets_schema(self):
self.assertEqual(
self.get_query("/api/planets/schema").status_code, 200)
self.get_query("/api/planets/schema/").status_code, 200)

def test_planets_search(self):
response = self.get_query("/api/planets/?search=yavin")
Expand All @@ -78,7 +78,7 @@ def test_films_root(self):

def test_films_schema(self):
self.assertEqual(
self.get_query("/api/films/schema").status_code, 200)
self.get_query("/api/films/schema/").status_code, 200)

def test_films_search(self):
response = self.get_query("/api/films/?search=sith")
Expand All @@ -97,7 +97,7 @@ def test_starships_root(self):

def test_starship_schema(self):
self.assertEqual(
self.get_query("/api/starships/schema").status_code, 200)
self.get_query("/api/starships/schema/").status_code, 200)

def test_starship_search(self):
response = self.get_query("/api/starships/?search=x1")
Expand All @@ -116,7 +116,7 @@ def test_vehicles_root(self):

def test_vehicle_schema(self):
self.assertEqual(
self.get_query("/api/vehicles/schema").status_code, 200)
self.get_query("/api/vehicles/schema/").status_code, 200)

def test_vehicle_search(self):
response = self.get_query("/api/vehicles/?search=crawler")
Expand All @@ -135,7 +135,7 @@ def test_species_root(self):

def test_species_schema(self):
self.assertEqual(
self.get_query("/api/species/schema").status_code, 200)
self.get_query("/api/species/schema/").status_code, 200)

def test_species_search(self):
response = self.get_query("/api/species/?search=calamari")
Expand Down
12 changes: 6 additions & 6 deletions swapi/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
url(r"^about$", "swapi.views.about"),
url(r"^stats$", "swapi.views.stats"),
url(r"^stripe/donation", "swapi.views.stripe_donation"),
url(r"^api/people/schema$", "resources.schemas.people"),
url(r"^api/planets/schema$", "resources.schemas.planets"),
url(r"^api/films/schema$", "resources.schemas.films"),
url(r"^api/species/schema$", "resources.schemas.species"),
url(r"^api/vehicles/schema$", "resources.schemas.vehicles"),
url(r"^api/starships/schema$", "resources.schemas.starships"),
url(r"^api/people/schema/?$", "resources.schemas.people"),
url(r"^api/planets/schema/?$", "resources.schemas.planets"),
url(r"^api/films/schema/?$", "resources.schemas.films"),
url(r"^api/species/schema/?$", "resources.schemas.species"),
url(r"^api/vehicles/schema/?$", "resources.schemas.vehicles"),
url(r"^api/starships/schema/?$", "resources.schemas.starships"),
url(r"^api/", include(router.urls)),
)