Coverage for django_napse/api/exchanges/serializers/exchange_account_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 ExchangeAccount 

4 

5 

6class ExchangeAccountSerializer(serializers.ModelSerializer): 

7 exchange = serializers.CharField(source="exchange.name") 

8 

9 class Meta: 

10 model = ExchangeAccount 

11 fields = [ 

12 "uuid", 

13 "exchange", 

14 "name", 

15 "description", 

16 "testing", 

17 ] 

18 read_only_fields = [ 

19 "uuid", 

20 "exchange", 

21 "testing", 

22 ]