Coverage for django_napse/api/transactions/serializers/debit_serializer.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.4.3, created at 2024-03-12 13:49 +0000

1from rest_framework import serializers 

2 

3from django_napse.core.models import debit 

4 

5 

6class DebitSerializer(serializers.ModelSerializer): 

7 operation_type = serializers.CharField(default="DEBIT") 

8 

9 class Meta: 

10 model = debit 

11 fields = [ 

12 "amount", 

13 "ticker", 

14 "operation_type", 

15 "created_at", 

16 ] 

17 read_only_fields = fields