Skip to content

Commit

Permalink
tests:file_action_enum - use normal assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCampinoti94 committed Oct 17, 2023
1 parent 563be1e commit 5dcb233
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions tests/file_action_enum_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,32 @@ def setUp(self):
)

def test_action_enum_values(self):
self.assertEqual(Action.CONVERT.value, "Convertool: To convert.")
self.assertEqual(Action.REPLACE.value, "Convertool: Replace with template. File is not preservable.")
self.assertEqual(
Action.MANUAL.value,
"Manual: File should be converted manually. [info about the manual conversion from reference_files].",
assert Action.CONVERT.value == "Convertool: To convert."
assert Action.REPLACE.value == "Convertool: Replace with template. File is not preservable."
assert Action.MANUAL.value == (
"Manual: File should be converted manually. [info about the manual conversion " "from reference_files]."
)
self.assertEqual(Action.RENAME.value, "Renamer: File has extension mismatch. Should be renamed")
assert Action.RENAME.value == "Renamer: File has extension mismatch. Should be renamed"

def test_file_action(self):
self.file.action = Action.CONVERT
self.assertEqual(self.file.action, Action.CONVERT)
self.assertEqual(self.file.action.value, "Convertool: To convert.")
assert self.file.action == Action.CONVERT
assert self.file.action.value == "Convertool: To convert."

self.file.action = Action.REPLACE
self.assertEqual(self.file.action, Action.REPLACE)
self.assertEqual(self.file.action.value, "Convertool: Replace with template. File is not preservable.")
assert self.file.action == Action.REPLACE
assert self.file.action.value == "Convertool: Replace with template. File is not preservable."

self.file.action = Action.MANUAL
self.assertEqual(self.file.action, Action.MANUAL)
self.assertEqual(
self.file.action.value,
"Manual: File should be converted manually. [info about the manual conversion from reference_files].",
assert self.file.action == Action.MANUAL
assert (
self.file.action.value
== "Manual: File should be converted manually. [info about the manual conversion from reference_files]."
)

self.file.action = Action.RENAME
self.assertEqual(self.file.action, Action.RENAME)
self.assertEqual(self.file.action.value, "Renamer: File has extension mismatch. Should be renamed")
assert self.file.action == Action.RENAME
assert self.file.action.value == "Renamer: File has extension mismatch. Should be renamed"


if __name__ == "__main__":
Expand Down

0 comments on commit 5dcb233

Please sign in to comment.