Fix CI: Rename to avoid warnings
This commit is contained in:
parent
b6d21167b1
commit
24fc95ff8a
1 changed files with 9 additions and 9 deletions
|
@ -9,7 +9,7 @@ from src.main.python.ddadevops.domain.c4k import C4k
|
|||
from src.main.python.ddadevops.c4k_mixin import add_c4k_mixin_config
|
||||
|
||||
|
||||
class TestValidateable(Validateable):
|
||||
class MockValidateable(Validateable):
|
||||
def __init__(self, value):
|
||||
self.field = value
|
||||
|
||||
|
@ -18,32 +18,32 @@ class TestValidateable(Validateable):
|
|||
|
||||
|
||||
def test_should_validate_non_empty_strings():
|
||||
sut = TestValidateable("content")
|
||||
sut = MockValidateable("content")
|
||||
assert sut.is_valid()
|
||||
|
||||
sut = TestValidateable(None)
|
||||
sut = MockValidateable(None)
|
||||
assert not sut.is_valid()
|
||||
|
||||
sut = TestValidateable("")
|
||||
sut = MockValidateable("")
|
||||
assert not sut.is_valid()
|
||||
|
||||
|
||||
def test_should_validate_non_empty_others():
|
||||
sut = TestValidateable(1)
|
||||
sut = MockValidateable(1)
|
||||
assert sut.is_valid()
|
||||
|
||||
sut = TestValidateable(1.0)
|
||||
sut = MockValidateable(1.0)
|
||||
assert sut.is_valid()
|
||||
|
||||
sut = TestValidateable(True)
|
||||
sut = MockValidateable(True)
|
||||
assert sut.is_valid()
|
||||
|
||||
sut = TestValidateable(None)
|
||||
sut = MockValidateable(None)
|
||||
assert not sut.is_valid()
|
||||
|
||||
|
||||
def test_validate_with_reason():
|
||||
sut = TestValidateable(None)
|
||||
sut = MockValidateable(None)
|
||||
assert sut.validate()[0] == "Field 'field' may not be empty."
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue