Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesridgway committed Dec 22, 2020
1 parent 9a4810e commit 9b78cfd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/devdeck/core/settings/test_control_validation_error.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
from assertpy import assert_that

from devdeck.controls.timer_control import TimerControl
from devdeck.core.settings.control_validation_error import ControlValidationError


class TestControlValidationError:
def test_errors_parsed(self):
errors = {'decks': [{0: [{'controls': [{3: [{'keyx': ['unknown field']}]}]}]}]}
exception = ControlValidationError(TimerControl(4, **{}), 4, errors)
exception = ControlValidationError(SomeControl(), 4, errors)
assert_that(str(exception)) \
.is_equal_to('The following validation errors occurred for TimerControl on key 4:\n * decks.0.controls.3.keyx: unknown field.')
.is_equal_to(
'The following validation errors occurred for SomeControl on key 4:\n * decks.0.controls.3.keyx: unknown field.')


class SomeControl:
pass

0 comments on commit 9b78cfd

Please sign in to comment.