diff --git a/backend/tests/test_simple_submissions/test_everything_not_ok.py b/backend/tests/test_simple_submissions/test_everything_not_ok.py index 1736b29a..14833f8c 100644 --- a/backend/tests/test_simple_submissions/test_everything_not_ok.py +++ b/backend/tests/test_simple_submissions/test_everything_not_ok.py @@ -50,7 +50,7 @@ class FaultyProjectConstraintValidationTest(unittest.TestCase): submission_constraint = SubmissionConstraint( root_constraint=ZipConstraint( zip_name="project.zip", - global_constraints=[ExtensionNotPresentConstraint(extension=".exe")], + global_constraints=[ExtensionNotPresentConstraint(not_present_extension=".exe")], sub_constraints=[ DirectoryConstraint( directory_name="src", @@ -72,7 +72,7 @@ class FaultyProjectConstraintValidationTest(unittest.TestCase): FileConstraint(file_name="README.md"), FileConstraint(file_name=".gitignore"), NotPresentConstraint(file_or_directory_name="dist"), - ExtensionNotPresentConstraint(extension=".log"), + ExtensionNotPresentConstraint(not_present_extension=".log"), ], ), ) diff --git a/backend/tests/test_simple_submissions/test_everything_ok.py b/backend/tests/test_simple_submissions/test_everything_ok.py index 25dd3b27..7fafdb96 100644 --- a/backend/tests/test_simple_submissions/test_everything_ok.py +++ b/backend/tests/test_simple_submissions/test_everything_ok.py @@ -45,7 +45,7 @@ class EverythingOkTest(unittest.TestCase): submission_constraint = SubmissionConstraint( root_constraint=ZipConstraint( zip_name="project.zip", - global_constraints=[ExtensionNotPresentConstraint(extension=".exe")], + global_constraints=[ExtensionNotPresentConstraint(not_present_extension=".exe")], sub_constraints=[ DirectoryConstraint( directory_name="src", @@ -71,8 +71,8 @@ class EverythingOkTest(unittest.TestCase): FileConstraint(file_name="README.md"), FileConstraint(file_name=".gitignore"), NotPresentConstraint(file_or_directory_name="dist"), - ExtensionNotPresentConstraint(extension=".class"), - ExtensionNotPresentConstraint(extension=".log"), + ExtensionNotPresentConstraint(not_present_extension=".class"), + ExtensionNotPresentConstraint(not_present_extension=".log"), ], ), ) diff --git a/backend/tests/test_simple_submissions/test_extension_not_present_constraint.py b/backend/tests/test_simple_submissions/test_extension_not_present_constraint.py index c53c4912..7417fa7e 100644 --- a/backend/tests/test_simple_submissions/test_extension_not_present_constraint.py +++ b/backend/tests/test_simple_submissions/test_extension_not_present_constraint.py @@ -44,12 +44,13 @@ class ExtensionNotPresentConstraintValidationTest(unittest.TestCase): zip_name="submission.zip", global_constraints=[], sub_constraints=[ - ExtensionNotPresentConstraint(extension=".java"), # .java is present, should fail - ExtensionNotPresentConstraint(extension=".c"), # .c is present, should fail - ExtensionNotPresentConstraint(extension=".cpp"), # .cpp is not present, should pass + ExtensionNotPresentConstraint(not_present_extension=".java"), # .java is present, should fail + ExtensionNotPresentConstraint(not_present_extension=".c"), # .c is present, should fail + ExtensionNotPresentConstraint(not_present_extension=".cpp"), # .cpp is not present, should pass DirectoryConstraint( # Directory is present, should pass directory_name="no_txt_in_this_folder", - sub_constraints=[ExtensionNotPresentConstraint(extension=".txt")], # .txt is present, should fail + sub_constraints=[ExtensionNotPresentConstraint(not_present_extension=".txt")], # .txt is + # present, should fail ), ], ), diff --git a/backend/tests/test_simple_submissions/test_global_constraint.py b/backend/tests/test_simple_submissions/test_global_constraint.py index e3a7388e..3e7ef346 100644 --- a/backend/tests/test_simple_submissions/test_global_constraint.py +++ b/backend/tests/test_simple_submissions/test_global_constraint.py @@ -35,9 +35,9 @@ class GlobalConstraintValidationTest(unittest.TestCase): root_constraint=ZipConstraint( zip_name="submission.zip", global_constraints=[ - ExtensionNotPresentConstraint(extension=".java"), - ExtensionNotPresentConstraint(extension=".c"), - ExtensionNotPresentConstraint(extension=".cpp"), + ExtensionNotPresentConstraint(not_present_extension=".java"), + ExtensionNotPresentConstraint(not_present_extension=".c"), + ExtensionNotPresentConstraint(not_present_extension=".cpp"), NotPresentConstraint(file_or_directory_name="dir4"), ], sub_constraints=[],