from rest_framework import serializers
from athena.models import Plan, TestSet, Objective, How

class PlanSerializer(serializers.HyperlinkedModelSerializer):
   class Meta:
      model = Plan
      fields = ('id', 'name', 'description', )

class TestSetSerializer(serializers.HyperlinkedModelSerializer):
   class Meta:
      model = TestSet 

class ObjectiveSerializer(serializers.HyperlinkedModelSerializer):
   class Meta:
      model = Objective 

class HowSerializer(serializers.HyperlinkedModelSerializer):
   class Meta:
      model = How 

class MySelf(serializers.Field):
   def to_native(self, obj):
      return obj


class TestSerializer(serializers.HyperlinkedModelSerializer):
   tests = MySelf()

   class Meta:
      model = TestSet 
      exclude = ('parameters', 'name', 'description')



