mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-09-17 01:32:30 +03:00
Add new test to check decimal_field_info_type
This commit is contained in:
parent
7494d7c4a9
commit
0392d95470
|
@ -324,6 +324,13 @@ class TestSimpleMetadataFieldInfo(TestCase):
|
||||||
)
|
)
|
||||||
assert 'choices' not in field_info
|
assert 'choices' not in field_info
|
||||||
|
|
||||||
|
def test_decimal_field_info_type(self):
|
||||||
|
options = metadata.SimpleMetadata()
|
||||||
|
field_info = options.get_field_info(serializers.DecimalField(max_digits=18, decimal_places=4))
|
||||||
|
assert field_info['type'] == 'decimal'
|
||||||
|
assert field_info['max_digits'] == 18
|
||||||
|
assert field_info['decimal_places'] == 4
|
||||||
|
|
||||||
|
|
||||||
class TestModelSerializerMetadata(TestCase):
|
class TestModelSerializerMetadata(TestCase):
|
||||||
def test_read_only_primary_key_related_field(self):
|
def test_read_only_primary_key_related_field(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user