# Path: app/timetables/factories.py
# class ServingFactory(TimestampFactory):
#     """Serving model factory."""
# 
#     class Meta:
#         model = models.Serving
# 
#     menu_item = factory.SubFactory(MenuItemFactory)
#     vendor = factory.SubFactory(VendorFactory)
#     date_served = datetime.date(2016, 10, 1)
# 
# class TimestampFactory(DjangoModelFactory):
#     """TimestampMixin model factory."""
# 
#     class Meta:
#         model = TimestampMixin
#         abstract = True
# 
#     date_created = timezone.make_aware(timezone.datetime(2008, 1, 1, 0, 0, 0))
#     date_modified = timezone.make_aware(timezone.datetime(2009, 1, 1, 0, 0, 0))
# 
# class UserFactory(DjangoModelFactory):
#     """Django admin user model factory."""
# 
#     class Meta:
#         model = get_user_model()
# 
#     username = 'admin'
#     email = 'admin@admin.com'
#     password = 'adminpassword'
#     is_superuser = True
#     is_active = True


import factory
from . import models
from app.timetables.factories import (ServingFactory, TimestampFactory,
                                      UserFactory,)



class ReviewFactory(TimestampFactory):
    """Review model factory."""

    class Meta:
        model = models.Review

    user = factory.SubFactory(UserFactory)

# Path: app/timetables/factories.py
# class ServingFactory(TimestampFactory):
#     """Serving model factory."""
# 
#     class Meta:
#         model = models.Serving
# 
#     menu_item = factory.SubFactory(MenuItemFactory)
#     vendor = factory.SubFactory(VendorFactory)
#     date_served = datetime.date(2016, 10, 1)
# 
# class TimestampFactory(DjangoModelFactory):
#     """TimestampMixin model factory."""
# 
#     class Meta:
#         model = TimestampMixin
#         abstract = True
# 
#     date_created = timezone.make_aware(timezone.datetime(2008, 1, 1, 0, 0, 0))
#     date_modified = timezone.make_aware(timezone.datetime(2009, 1, 1, 0, 0, 0))
# 
# class UserFactory(DjangoModelFactory):
#     """Django admin user model factory."""
# 
#     class Meta:
#         model = get_user_model()
# 
#     username = 'admin'
#     email = 'admin@admin.com'
#     password = 'adminpassword'
#     is_superuser = True
#     is_active = True


# Path: app/reviews/factories.py
import factory
from . import models
from app.timetables.factories import (ServingFactory, TimestampFactory,
                                      UserFactory,)




class ReviewFactory(TimestampFactory):
    """Review model factory."""

    class Meta:
        model = models.Review

    user = factory.SubFactory(UserFactory)

    serving = factory.SubFactory(ServingFactory)