# Path: tests/v1/python/accounts/test_models.py
# class UserFactory(factory.DjangoModelFactory):
#     first_name = 'John'
#     last_name = 'Doe'
#     is_active = True
#     facebook_uid = str(uuid.uuid4())
# 
#     class Meta:
#         model = User
#         django_get_or_create = ('email',)


import responses
from rest_framework import status
from rest_framework.test import APITestCase
from accounts.v1.serializers import LoginRegistrationSerializer, OneSignalSerializer, UserRegistrationSerializer, \
    UserEmailUpdateSerializer, UserAppVersionUpdateSerializer
from lib.v1.testutils import CustomTestCase
from tests.v1.python.accounts.test_models import UserFactory
         },
        {'data': {'email': 'a@a.com',
                  'name': 'John Doe',
                  'password': 'test',
                  'confirm_password': 'test2',
                  'app_version': '2.0',
                  'facebook_uid': 'randomfacebookuid'},
         'error': ('non_field_errors', ['Passwords don\'t match.']),
         'label': 'Password and confirm password don\'t match.',
         'method': 'POST',
         'status': status.HTTP_400_BAD_REQUEST
         }
    ]
    VALID_DATA_DICT = [
        {'email': 'emailsuccess@a.com',
         'name': 'John Doe',
         'password': 'test',
         'confirm_password': 'test',
         'facebook_uid': 'randomfacebookuid_1'},
        {'email': 'emailsuccess@a.com',
         'name': 'John Doe',
         'app_version': '1.0',
         'password': 'test',
         'confirm_password': 'test',
         'facebook_uid': 'randomfacebookuid_2'},
    ]

    def setUp(self):
        self.required_fields = ['email', 'name', 'password', 'confirm_password', 'facebook_uid']
        self.not_required_fields = ['app_version', 'branch_data']

# Path: tests/v1/python/accounts/test_models.py
# class UserFactory(factory.DjangoModelFactory):
#     first_name = 'John'
#     last_name = 'Doe'
#     is_active = True
#     facebook_uid = str(uuid.uuid4())
# 
#     class Meta:
#         model = User
#         django_get_or_create = ('email',)


# Path: tests/v1/python/accounts/test_serializers.py
import responses
from rest_framework import status
from rest_framework.test import APITestCase
from accounts.v1.serializers import LoginRegistrationSerializer, OneSignalSerializer, UserRegistrationSerializer, \
    UserEmailUpdateSerializer, UserAppVersionUpdateSerializer
from lib.v1.testutils import CustomTestCase
from tests.v1.python.accounts.test_models import UserFactory

         },
        {'data': {'email': 'a@a.com',
                  'name': 'John Doe',
                  'password': 'test',
                  'confirm_password': 'test2',
                  'app_version': '2.0',
                  'facebook_uid': 'randomfacebookuid'},
         'error': ('non_field_errors', ['Passwords don\'t match.']),
         'label': 'Password and confirm password don\'t match.',
         'method': 'POST',
         'status': status.HTTP_400_BAD_REQUEST
         }
    ]
    VALID_DATA_DICT = [
        {'email': 'emailsuccess@a.com',
         'name': 'John Doe',
         'password': 'test',
         'confirm_password': 'test',
         'facebook_uid': 'randomfacebookuid_1'},
        {'email': 'emailsuccess@a.com',
         'name': 'John Doe',
         'app_version': '1.0',
         'password': 'test',
         'confirm_password': 'test',
         'facebook_uid': 'randomfacebookuid_2'},
    ]

    def setUp(self):
        self.required_fields = ['email', 'name', 'password', 'confirm_password', 'facebook_uid']
        self.not_required_fields = ['app_version', 'branch_data']

        self.user = UserFactory(email='b@b.com')