mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 09:12:11 +01:00 
			
		
		
		
	Deposit check logic changed
This commit is contained in:
		@@ -126,7 +126,8 @@ class TestWEIAlgorithm(TestCase):
 | 
			
		||||
            for r2 in WEIRegistration.objects.filter(wei=self.wei, pk__gt=r1.pk):
 | 
			
		||||
                survey2 = WEISurvey2025(r2)
 | 
			
		||||
                bus2 = survey2.information.get_selected_bus()
 | 
			
		||||
                
 | 
			
		||||
 | 
			
		||||
                prefer_switch_bus_words = survey1.score_words(bus2) > survey1.score_words(bus1) and survey2.score_words(bus1) > survey2.score_words(bus2)
 | 
			
		||||
                prefer_switch_bus_questions = survey1.score_questions(bus2) > survey1.score_questions(bus1) and survey2.score_questions(bus1) > survey2.score_questions(bus2)
 | 
			
		||||
                self.assertFalse(prefer_switch_bus_words and prefer_switch_bus_questions)
 | 
			
		||||
                prefer_switch_bus_questions = survey1.score_questions(bus2) > survey1.score_questions(bus1) and\
 | 
			
		||||
                    survey2.score_questions(bus1) > survey2.score_questions(bus2)
 | 
			
		||||
                self.assertFalse(prefer_switch_bus_words and prefer_switch_bus_questions)
 | 
			
		||||
 
 | 
			
		||||
@@ -101,7 +101,7 @@ class TestWEIRegistration(TestCase):
 | 
			
		||||
            user_id=self.user.id,
 | 
			
		||||
            wei_id=self.wei.id,
 | 
			
		||||
            soge_credit=True,
 | 
			
		||||
            deposit_check=True,
 | 
			
		||||
            deposit_given=True,
 | 
			
		||||
            birth_date=date(2000, 1, 1),
 | 
			
		||||
            gender="nonbinary",
 | 
			
		||||
            clothing_cut="male",
 | 
			
		||||
@@ -642,7 +642,7 @@ class TestWEIRegistration(TestCase):
 | 
			
		||||
            last_name="admin",
 | 
			
		||||
            first_name="admin",
 | 
			
		||||
            bank="Société générale",
 | 
			
		||||
            deposit_check=True,
 | 
			
		||||
            deposit_given=True,
 | 
			
		||||
        ))
 | 
			
		||||
        self.assertEqual(response.status_code, 200)
 | 
			
		||||
        self.assertFalse(response.context["form"].is_valid())
 | 
			
		||||
@@ -657,7 +657,7 @@ class TestWEIRegistration(TestCase):
 | 
			
		||||
            last_name="admin",
 | 
			
		||||
            first_name="admin",
 | 
			
		||||
            bank="Société générale",
 | 
			
		||||
            deposit_check=True,
 | 
			
		||||
            deposit_given=True,
 | 
			
		||||
        ))
 | 
			
		||||
        self.assertRedirects(response, reverse("wei:wei_registrations", kwargs=dict(pk=self.registration.wei.pk)), 302, 200)
 | 
			
		||||
 | 
			
		||||
@@ -813,7 +813,7 @@ class TestWeiAPI(TestAPI):
 | 
			
		||||
            user_id=self.user.id,
 | 
			
		||||
            wei_id=self.wei.id,
 | 
			
		||||
            soge_credit=True,
 | 
			
		||||
            deposit_check=True,
 | 
			
		||||
            deposit_given=True,
 | 
			
		||||
            birth_date=date(2000, 1, 1),
 | 
			
		||||
            gender="nonbinary",
 | 
			
		||||
            clothing_cut="male",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user