@@ -76,10 +76,10 @@ def test_migrate_all_file_policies_to_database(self):
7676
7777 Expected Result:
7878 - All policies from the file are loaded into the database
79- - The file contains 31 regular policies (p rules)
79+ - The file contains 32 regular policies (p rules)
8080 - Policy content matches expected file content
8181 """
82- expected_policy_count = 31
82+ expected_policy_count = 32
8383
8484 migrate_policy_between_enforcers (self .source_enforcer , self .target_enforcer )
8585 self .target_enforcer .load_policy ()
@@ -216,7 +216,7 @@ def test_migrate_complete_file_contents(self):
216216
217217 self .assertEqual (
218218 len (self .target_enforcer .get_policy ()),
219- 31 ,
219+ 32 ,
220220 "Should have 31 regular policies from file" ,
221221 )
222222 self .assertEqual (
@@ -250,8 +250,8 @@ def test_migrate_partial_duplicates(self):
250250 target_policies = self .target_enforcer .get_policy ()
251251 self .assertEqual (
252252 len (target_policies ),
253- 31 ,
254- "Should have 31 policies total, with no duplicates" ,
253+ 32 ,
254+ "Should have 32 policies total, with no duplicates" ,
255255 )
256256
257257 duplicates = CasbinRule .objects .values ("v0" , "v1" , "v2" ).annotate (total = Count ("*" )).filter (total__gt = 1 )
@@ -346,7 +346,7 @@ def test_migrate_preserves_existing_db_policies(self):
346346 migrate_policy_between_enforcers (self .source_enforcer , self .target_enforcer )
347347
348348 target_policies = self .target_enforcer .get_policy ()
349- self .assertEqual (len (target_policies ), 32 , "Should have 31 file policies + 1 custom policy" )
349+ self .assertEqual (len (target_policies ), 33 , "Should have 32 file policies + 1 custom policy" )
350350 self .assertIn (custom_policy , target_policies , "Custom database policy should be preserved" )
351351
352352 def test_migrate_preserves_user_role_assignments_in_db (self ):
@@ -382,4 +382,4 @@ def test_migrate_preserves_user_role_assignments_in_db(self):
382382 )
383383
384384 target_policies = self .target_enforcer .get_policy ()
385- self .assertEqual (len (target_policies ), 31 , "All 31 policies from file should be loaded" )
385+ self .assertEqual (len (target_policies ), 32 , "All 32 policies from file should be loaded" )
0 commit comments