from django.core.urlresolvers import reverse
from rest_framework.test import APITestCase
from rest_framework import status
import factory
from .models import BaseAccount


class UserFactory(factory.Factory):

    class Meta:
        model = BaseAccount

    first_name = 'John'
    last_name = 'Doe'
    email = '{}.{}@email.com'.format(first_name, last_name)
    password = 'passjohn1'


class CreateUserTest(APITestCase):

    def setUp(self):
        self.user = UserFactory()
        self.client.login(email=self.user.email, password=self.user.password)

    def test_can_create_user(self):
        response = self.client.get(
                reverse('_accounts:account-list'),)
        self.assertEqual(response.status_code, status.HTTP_200_OK)

@@ -131,16 +131,28 @@
 factory%0A
+import json%0A
 from .mo
@@ -175,16 +175,64 @@
 Account%0A
+from .serializers import WholeAccountSerializer%0A
 %0A%0Aclass 
@@ -251,16 +251,34 @@
 factory.
+django.DjangoModel
 Factory)
@@ -466,16 +466,26 @@
 %0A%0Aclass 
+FactoryBoy
 CreateUs
@@ -564,86 +564,8 @@
 ry()
-%0A        self.client.login(email=self.user.email, password=self.user.password)
 %0A%0A  
@@ -646,20 +646,16 @@
         
-    
 reverse(
@@ -677,15 +677,34 @@
 unt-
-list'),
+detail', kwargs=%7B'pk': 1%7D)
 )%0A  
@@ -768,8 +768,147 @@
 200_OK)%0A
+        self.assertJSONEqual(%0A            raw=json.dumps(response.data),%0A            expected_data=WholeAccountSerializer(self.user).data)%0A

Create a test for user creation through `FactoryBoy`