mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-10-31 09:03:06 +00:00 
			
		
		
		
	api to fetch albums
This commit is contained in:
		| @@ -228,3 +228,16 @@ class TestPictureModeration(TestSas): | ||||
|         assert res.status_code == 200 | ||||
|         assert len(res.json()) == 1 | ||||
|         assert res.json()[0]["author"]["id"] == self.user_a.id | ||||
|  | ||||
|  | ||||
| class TestAlbumSearch(TestSas): | ||||
|     def test_num_queries(self): | ||||
|         """Check the number of queries is stable""" | ||||
|         self.client.force_login(subscriber_user.make()) | ||||
|         cache.clear() | ||||
|         with self.assertNumQueries(7): | ||||
|             # - 2 for authentication | ||||
|             # - 3 to check permissions | ||||
|             # - 1 for pagination | ||||
|             # - 1 for the actual results | ||||
|             self.client.get(reverse("api:search-album")) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user