mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-10-31 00:53:08 +00:00 
			
		
		
		
	counter: fix error for stats 500 on PermissionDenied
This commit is contained in:
		| @@ -83,6 +83,17 @@ class CounterTest(TestCase): | ||||
|         ) | ||||
|  | ||||
|  | ||||
| class CounterStatsTest(TestCase): | ||||
|     def setUp(self): | ||||
|         call_command("populate") | ||||
|         self.counter = Counter.objects.filter(id=2).first() | ||||
|  | ||||
|     def test_unothorized_user_fail(self): | ||||
|         # Test with not login user | ||||
|         response = self.client.get(reverse("counter:stats", args=[self.counter.id])) | ||||
|         self.assertTrue(response.status_code == 403) | ||||
|  | ||||
|  | ||||
| class BarmanConnectionTest(TestCase): | ||||
|     def setUp(self): | ||||
|         call_command("populate") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user