<gh_stars>0
from core.serializers import serializers
from core.models import Admin
from django.test import TestCase


class AdminSerializerTest(TestCase):

    def setUp(self):
        self.adminAttribs = {
            'email': '<EMAIL>',
            'lastName': 'Testineer',
            'firstName': 'Test',
            'password': '<PASSWORD>',
            'username': 'test6',
            'id': '1',
            'receiveUpdates': 'True',
        }

        self.admin = Admin.objects.create(**self.adminAttribs)
        self.serializer = serializers.AdminSerializer(instance=self.admin)
        self.data = self.serializer.data

    def testContainsExpectedFields(self):
        self.assertEqual(set(self.data.keys()), set(self.adminAttribs.keys()))
from core.serializers import serializers
from core.models import Admin
from django.test import TestCase


class AdminSerializerTest(TestCase):

    def setUp(self):
        self.adminAttribs = {
            'email': '<EMAIL>',
            'lastName': 'Testineer',
            'firstName': 'Test',
            'password': '<PASSWORD>',
            'username': 'test6',
            'id': '1',
            'receiveUpdates': 'True',
        }

        self.admin = Admin.objects.create(**self.adminAttribs)
        self.serializer = serializers.AdminSerializer(instance=self.admin)
        self.data = self.serializer.data

    def testContainsExpectedFields(self):
        self.assertEqual(set(self.data.keys()), set(self.adminAttribs.keys()))