Change comparisons to use 'is'

This commit is contained in:
Joshua Kifer
2021-07-24 11:48:11 -07:00
parent 29761999e7
commit 5dcbe8f0e5

View File

@ -505,9 +505,9 @@ async def test_inheritance_with_multi_relation():
def test_custom_config():
# Custom config inherits defaults
assert getattr(ImmutablePerson.__config__, "orm_mode") == True
assert getattr(ImmutablePerson.__config__, "orm_mode") is True
# Custom config can override defaults
assert getattr(ImmutablePerson.__config__, "validate_assignment") == False
assert getattr(ImmutablePerson.__config__, "validate_assignment") is False
sam = ImmutablePerson(name="Sam")
with pytest.raises(TypeError):
sam.name = "Not Sam"