# Path: sectesting/streetart/tests/data.py
# class StreetArtTestData(object):
#     """
#     This class contains test data for use in unit testing the Street Art project.
#     """
# 
#     USERS = {
#         "user_1": {
#             "email": "test1@streetart.com",
#             "first_name": "Barry",
#             "last_name": "Bonds",
#             "date_joined": datetime.now(),
#             "is_active": True,
#             "is_staff": False,
#             "is_superuser": False,
#             "password": "Password123",
#         },
#         "user_2": {
#             "email": "test2@streetart.com",
#             "first_name": "Billy",
#             "last_name": "Bonds",
#             "date_joined": datetime.now(),
#             "is_active": True,
#             "is_staff": False,
#             "is_superuser": False,
#             "password": "Password123",
#         },
#         "admin_1": {
#             "email": "test3@streetart.com",
#             "first_name": "Bondy",
#             "last_name": "Bonds",
#             "date_joined": datetime.now(),
#             "is_active": True,
#             "is_staff": False,
#             "is_superuser": True,
#             "password": "Password123",
#         }
#     }
# 
# Path: sectesting/streetart/models/post.py
# class StreetArtPost(BaseStreetArtModel):
#     """
#     This is a model for containing all of the relevant data for a post referencing street art.
#     """
# 
#     # Columns
# 
#     latitude = models.FloatField(null=True)
#     longitude = models.FloatField(null=True)
#     title = models.CharField(max_length=32, null=True)
#     description = models.CharField(max_length=256, null=True)
#     s3_bucket = models.CharField(max_length=32, null=True)
#     s3_key = models.CharField(max_length=64, null=True)
#     current_vote = models.IntegerField(default=0)
# 
#     # Foreign Keys
# 
#     user = models.ForeignKey(
#         settings.AUTH_USER_MODEL,
#         related_name="posts",
#         on_delete=models.CASCADE,
#         null=True,
#     )
# 
#     # Methods
# 
#     def get_absolute_url(self):
#         """
#         Get the absolute URL to view the contents of this post at.
#         :return: The absolute URL to view the contents of this post at.
#         """
#         return "/view-post/%s/" % (self.uuid,)
# 
#     # Properties
# 
#     @property
#     def coordinates_string(self):
#         """
#         Get a string representing the coordinates where this photograph was taken.
#         :return: a string representing the coordinates where this photograph was taken.
#         """
#         return "%s, %s" % (self.latitude, self.longitude)
# 
#     @property
#     def has_coordinates(self):
#         """
#         Get whether or not this post has coordinates associated with it.
#         :return: whether or not this post has coordinates associated with it.
#         """
#         return self.latitude is not None and self.longitude is not None
# 
#     @property
#     def s3_url(self):
#         """
#         Get a signed URL to retrieve the referenced image from Amazon S3.
#         :return: a signed URL to retrieve the referenced image from Amazon S3.
#         """
#         s3_helper = S3Helper.instance()
#         return s3_helper.get_signed_url_for_key(key=str(self.uuid), bucket=settings.AWS_S3_BUCKET)
# 
# Path: sectesting/streetart/models/user.py
# class StreetArtUser(AbstractBaseUser, PermissionsMixin, BaseStreetArtModel):
#     """
#     This is a custom user class for users of the Street Art project.
#     """
# 
#     # Columns
# 
#     email = models.EmailField(_('email address'), unique=True)
#     first_name = models.CharField(_('first name'), max_length=30, blank=True)
#     last_name = models.CharField(_('last name'), max_length=30, blank=True)
#     date_joined = models.DateTimeField(_('date joined'), auto_now_add=True)
#     is_active = models.BooleanField(_('active'), default=True)
#     is_staff = models.BooleanField(default=False)
# 
#     USERNAME_FIELD = "email"
#     REQUIRED_FIELDS = []
# 
#     objects = StreetArtUserManager()
# 
#     # Class Meta
# 
#     class Meta:
#         verbose_name = _('user')
#         verbose_name_plural = _('users')
# 
#     # Methods
# 
#     def get_full_name(self):
#         """
#         Get a string representing the user's full name.
#         :return: A string representing the user's full name.
#         """
#         to_return = "%s %s" % (self.first_name, self.last_name)
#         return to_return.strip()
# 
#     def get_short_name(self):
#         """
#         Get a string representing the user's short name.
#         :return: A string representing the user's short name.
#         """
#         return self.first_name
# 
#     def send_email(self, subject, message, from_email=None, **kwargs):
#         """
#         Send an email to this user.
#         :param subject: The subject for the email.
#         :param message: The message to include in the email.
#         :param from_email: The email address where the email should originate from.
#         :param kwargs: Keyword arguments for send_mail.
#         :return: None
#         """
#         send_mail(subject, message, from_email, [self.email], **kwargs)


from faker import Faker
from uuid import uuid4
from .data import StreetArtTestData
from ..models import StreetArtUser, StreetArtPost
# -*- coding: utf-8 -*-
from __future__ import absolute_import




class SaFaker(object):
    """
    This is a class for creating dummy database models for testing purposes.
    """

    # Class Members

    # Instantiation

    # Static Methods

    @staticmethod
    def create_posts_for_user(to_populate=None, count=100):
        """
        Create a number of StreetArtPost objects and associate them with the given
        user.
        :param to_populate: The user to populate.
        :param count: The number of posts to add to the user.
        :return: The newly-created posts.
        """
        new_posts = []
        faker = Faker()
        for i in range(count):

# Path: sectesting/streetart/tests/data.py
# class StreetArtTestData(object):
#     """
#     This class contains test data for use in unit testing the Street Art project.
#     """
# 
#     USERS = {
#         "user_1": {
#             "email": "test1@streetart.com",
#             "first_name": "Barry",
#             "last_name": "Bonds",
#             "date_joined": datetime.now(),
#             "is_active": True,
#             "is_staff": False,
#             "is_superuser": False,
#             "password": "Password123",
#         },
#         "user_2": {
#             "email": "test2@streetart.com",
#             "first_name": "Billy",
#             "last_name": "Bonds",
#             "date_joined": datetime.now(),
#             "is_active": True,
#             "is_staff": False,
#             "is_superuser": False,
#             "password": "Password123",
#         },
#         "admin_1": {
#             "email": "test3@streetart.com",
#             "first_name": "Bondy",
#             "last_name": "Bonds",
#             "date_joined": datetime.now(),
#             "is_active": True,
#             "is_staff": False,
#             "is_superuser": True,
#             "password": "Password123",
#         }
#     }
# 
# Path: sectesting/streetart/models/post.py
# class StreetArtPost(BaseStreetArtModel):
#     """
#     This is a model for containing all of the relevant data for a post referencing street art.
#     """
# 
#     # Columns
# 
#     latitude = models.FloatField(null=True)
#     longitude = models.FloatField(null=True)
#     title = models.CharField(max_length=32, null=True)
#     description = models.CharField(max_length=256, null=True)
#     s3_bucket = models.CharField(max_length=32, null=True)
#     s3_key = models.CharField(max_length=64, null=True)
#     current_vote = models.IntegerField(default=0)
# 
#     # Foreign Keys
# 
#     user = models.ForeignKey(
#         settings.AUTH_USER_MODEL,
#         related_name="posts",
#         on_delete=models.CASCADE,
#         null=True,
#     )
# 
#     # Methods
# 
#     def get_absolute_url(self):
#         """
#         Get the absolute URL to view the contents of this post at.
#         :return: The absolute URL to view the contents of this post at.
#         """
#         return "/view-post/%s/" % (self.uuid,)
# 
#     # Properties
# 
#     @property
#     def coordinates_string(self):
#         """
#         Get a string representing the coordinates where this photograph was taken.
#         :return: a string representing the coordinates where this photograph was taken.
#         """
#         return "%s, %s" % (self.latitude, self.longitude)
# 
#     @property
#     def has_coordinates(self):
#         """
#         Get whether or not this post has coordinates associated with it.
#         :return: whether or not this post has coordinates associated with it.
#         """
#         return self.latitude is not None and self.longitude is not None
# 
#     @property
#     def s3_url(self):
#         """
#         Get a signed URL to retrieve the referenced image from Amazon S3.
#         :return: a signed URL to retrieve the referenced image from Amazon S3.
#         """
#         s3_helper = S3Helper.instance()
#         return s3_helper.get_signed_url_for_key(key=str(self.uuid), bucket=settings.AWS_S3_BUCKET)
# 
# Path: sectesting/streetart/models/user.py
# class StreetArtUser(AbstractBaseUser, PermissionsMixin, BaseStreetArtModel):
#     """
#     This is a custom user class for users of the Street Art project.
#     """
# 
#     # Columns
# 
#     email = models.EmailField(_('email address'), unique=True)
#     first_name = models.CharField(_('first name'), max_length=30, blank=True)
#     last_name = models.CharField(_('last name'), max_length=30, blank=True)
#     date_joined = models.DateTimeField(_('date joined'), auto_now_add=True)
#     is_active = models.BooleanField(_('active'), default=True)
#     is_staff = models.BooleanField(default=False)
# 
#     USERNAME_FIELD = "email"
#     REQUIRED_FIELDS = []
# 
#     objects = StreetArtUserManager()
# 
#     # Class Meta
# 
#     class Meta:
#         verbose_name = _('user')
#         verbose_name_plural = _('users')
# 
#     # Methods
# 
#     def get_full_name(self):
#         """
#         Get a string representing the user's full name.
#         :return: A string representing the user's full name.
#         """
#         to_return = "%s %s" % (self.first_name, self.last_name)
#         return to_return.strip()
# 
#     def get_short_name(self):
#         """
#         Get a string representing the user's short name.
#         :return: A string representing the user's short name.
#         """
#         return self.first_name
# 
#     def send_email(self, subject, message, from_email=None, **kwargs):
#         """
#         Send an email to this user.
#         :param subject: The subject for the email.
#         :param message: The message to include in the email.
#         :param from_email: The email address where the email should originate from.
#         :param kwargs: Keyword arguments for send_mail.
#         :return: None
#         """
#         send_mail(subject, message, from_email, [self.email], **kwargs)


# Path: sectesting/streetart/tests/safaker.py
from faker import Faker
from uuid import uuid4
from .data import StreetArtTestData
from ..models import StreetArtUser, StreetArtPost

# -*- coding: utf-8 -*-
from __future__ import absolute_import




class SaFaker(object):
    """
    This is a class for creating dummy database models for testing purposes.
    """

    # Class Members

    # Instantiation

    # Static Methods

    @staticmethod
    def create_posts_for_user(to_populate=None, count=100):
        """
        Create a number of StreetArtPost objects and associate them with the given
        user.
        :param to_populate: The user to populate.
        :param count: The number of posts to add to the user.
        :return: The newly-created posts.
        """
        new_posts = []
        faker = Faker()
        for i in range(count):

            new_posts.append(StreetArtPost.objects.create(