aboutsummaryrefslogtreecommitdiffstats
path: root/iceci/serializers.py
diff options
context:
space:
mode:
authorEdan Binshtok <eb578m@intl.att.com>2017-11-19 11:50:50 +0200
committerEdan Binshtok <eb578m@intl.att.com>2017-11-19 11:51:04 +0200
commit71891b3040605103397ffa7fb349215eced3a2c3 (patch)
tree22dda04edd1b8ee0d0de2a6a260d6d60e42cba25 /iceci/serializers.py
parent433a8256e31f755f5e236491bbe39d3db24d6d6d (diff)
Pep8 another fixes
Add more fixes to pep8 Issue-ID: VVP-25 Change-Id: Icc3bd3977ced2b537c858a9801e04a6bf6d1db05 Signed-off-by: Edan Binshtok <eb578m@intl.att.com>
Diffstat (limited to 'iceci/serializers.py')
-rw-r--r--iceci/serializers.py37
1 files changed, 28 insertions, 9 deletions
diff --git a/iceci/serializers.py b/iceci/serializers.py
index b597c10..2eaae34 100644
--- a/iceci/serializers.py
+++ b/iceci/serializers.py
@@ -1,5 +1,5 @@
-
-# ============LICENSE_START==========================================
+
+# ============LICENSE_START==========================================
# org.onap.vvp/test-engine
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -39,25 +39,44 @@
from rest_framework import serializers
from .models import TestResults
+
class TestResultsModelSerializer(serializers.ModelSerializer):
class Meta:
model = TestResults
- fields = ('testType', 'testFeature', 'testName', 'testResult', 'notes', 'create_time',)
+ fields = (
+ 'testType',
+ 'testFeature',
+ 'testName',
+ 'testResult',
+ 'notes',
+ 'create_time',
+ )
+
class TestResultsSerializer(serializers.Serializer):
class Meta:
model = TestResults
- fields = ('testType', 'testFeature', 'testName', 'testResult', 'notes', 'create_time',)
-
+ fields = (
+ 'testType',
+ 'testFeature',
+ 'testName',
+ 'testResult',
+ 'notes',
+ 'create_time',
+ )
+
def create(self, validated_data):
return TestResults(**validated_data)
-
+
def update(self, instance, validated_data):
instance.testType = validated_data.get('testType', instance.testType)
- instance.testFeature = validated_data.get('testFeature', instance.testFeature)
+ instance.testFeature = validated_data.get(
+ 'testFeature', instance.testFeature)
instance.testName = validated_data.get('testName', instance.testName)
- instance.testResult = validated_data.get('testResult', instance.testResult)
+ instance.testResult = validated_data.get(
+ 'testResult', instance.testResult)
instance.notes = validated_data.get('notes', instance.notes)
instance.duration = validated_data.get('duration', instance.duration)
- instance.create_time = validated_data.get('create_time', instance.create_time)
+ instance.create_time = validated_data.get(
+ 'create_time', instance.create_time)
return instance