add test exclusion for postgres as it uses transaction timestamp
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
# 0.3.10
|
||||||
|
|
||||||
|
* Fix
|
||||||
|
|
||||||
# 0.3.9
|
# 0.3.9
|
||||||
|
|
||||||
* Fix json schema generation as of [#19][#19]
|
* Fix json schema generation as of [#19][#19]
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class BaseField:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_default(cls, use_server: bool = False) -> Any: # noqa CCR001
|
def get_default(cls, use_server: bool = False) -> Any: # noqa CCR001
|
||||||
if cls.has_default():
|
if cls.has_default():
|
||||||
default = (
|
default = (
|
||||||
cls.default
|
cls.default
|
||||||
|
|||||||
@ -77,6 +77,9 @@ async def test_model_creation():
|
|||||||
|
|
||||||
p2 = await Product.objects.create(name='Test3')
|
p2 = await Product.objects.create(name='Test3')
|
||||||
assert p2.created is not None
|
assert p2.created is not None
|
||||||
assert p1.created != p2.created
|
|
||||||
assert p2.company == 'Acme'
|
assert p2.company == 'Acme'
|
||||||
assert p2.sort_order == 10
|
assert p2.sort_order == 10
|
||||||
|
|
||||||
|
if Product.db_backend_name() != 'postgresql':
|
||||||
|
# postgres use transaction timestamp so it will remain the same
|
||||||
|
assert p1.created != p2.created
|
||||||
|
|||||||
Reference in New Issue
Block a user