# Path: periods/models.py
# def today():
#     def timezone(self):
#     def first_days(self):
#     def cycle_count(self):
#     def get_previous_period(self, previous_to):
#     def get_next_period(self, after=None):
#     def get_cache_key(self, data_type):
#     def get_cycle_lengths(self):
#     def get_sorted_cycle_lengths(self):
#     def get_full_name(self):
#     def get_short_name(self):
#     def __str__(self):
#     def choices(cls, blank=False):
#     def __str__(self):
#     def _get_ordinal_value(self, index):
#     def cycle_length_minimum(self):
#     def cycle_length_maximum(self):
#     def _get_statistics_value(self, method_name, num_values_required=1):
#     def cycle_length_mean(self):
#     def cycle_length_median(self):
#     def cycle_length_mode(self):
#     def cycle_length_standard_deviation(self):
#     def current_cycle_length(self):
#     def first_date(self):
#     def first_day(self):
#     def set_start_date_and_day(self, min_timestamp):
#     def predicted_events(self):
#     def __str__(self):
#     def get_from_server(from_date):
#     def get_for_date(cls, from_date, to_date):
# def create_auth_token(sender, instance=None, created=False, **kwargs):
# def add_to_permissions_group(sender, instance, **kwargs):
# def create_statistics(sender, instance, **kwargs):
# def update_statistics(sender, instance, **kwargs):
# class User(AbstractEmailUser):
# class LabelChoicesEnum(enum.Enum):
# class FlowLevel(LabelChoicesEnum):
# class FlowColor(LabelChoicesEnum):
# class ClotSize(LabelChoicesEnum):
# class CrampLevel(LabelChoicesEnum):
# class FlowEvent(models.Model):
# class Statistics(models.Model):
#     class Meta:
# class AerisData(models.Model):
#     SPOTTING = 0
#     LIGHT = 1
#     MEDIUM = 2
#     HEAVY = 3
#     VERY_HEAVY = 4
#     PINK = 0
#     LIGHT_RED = 1
#     RED = 2
#     DARK_RED = 3
#     BROWN = 4
#     BLACK = 5
#     SMALL = 0
#     MEDIUM = 1
#     LARGE = 2
#     SLIGHT = 0
#     MODERATE = 1
#     SEVERE = 2
# 
# Path: periods/management/commands/email_active_users.py
# class Command(BaseCommand):
#     def add_arguments(self, parser):
#     def handle(self, *args, **options):
# 
# Path: periods/tests/factories.py
# class FlowEventFactory(factory.DjangoModelFactory):
#     class Meta:
#         model = period_models.FlowEvent
# 
#     user = factory.SubFactory(UserFactory)
#     timestamp = pytz.utc.localize(datetime.datetime(2014, 1, 31, 17, 0, 0))
#     first_day = True


import datetime
import pytz
from django.test import TestCase
from mock import patch
from periods import models as period_models
from periods.management.commands import email_active_users
from periods.tests.factories import FlowEventFactory



TIMEZONE = pytz.timezone("US/Eastern")


class TestCommand(TestCase):
    def setUp(self):
        self.command = email_active_users.Command()
        flow_event = FlowEventFactory()
        self.user = flow_event.user

# Path: periods/models.py
# def today():
#     def timezone(self):
#     def first_days(self):
#     def cycle_count(self):
#     def get_previous_period(self, previous_to):
#     def get_next_period(self, after=None):
#     def get_cache_key(self, data_type):
#     def get_cycle_lengths(self):
#     def get_sorted_cycle_lengths(self):
#     def get_full_name(self):
#     def get_short_name(self):
#     def __str__(self):
#     def choices(cls, blank=False):
#     def __str__(self):
#     def _get_ordinal_value(self, index):
#     def cycle_length_minimum(self):
#     def cycle_length_maximum(self):
#     def _get_statistics_value(self, method_name, num_values_required=1):
#     def cycle_length_mean(self):
#     def cycle_length_median(self):
#     def cycle_length_mode(self):
#     def cycle_length_standard_deviation(self):
#     def current_cycle_length(self):
#     def first_date(self):
#     def first_day(self):
#     def set_start_date_and_day(self, min_timestamp):
#     def predicted_events(self):
#     def __str__(self):
#     def get_from_server(from_date):
#     def get_for_date(cls, from_date, to_date):
# def create_auth_token(sender, instance=None, created=False, **kwargs):
# def add_to_permissions_group(sender, instance, **kwargs):
# def create_statistics(sender, instance, **kwargs):
# def update_statistics(sender, instance, **kwargs):
# class User(AbstractEmailUser):
# class LabelChoicesEnum(enum.Enum):
# class FlowLevel(LabelChoicesEnum):
# class FlowColor(LabelChoicesEnum):
# class ClotSize(LabelChoicesEnum):
# class CrampLevel(LabelChoicesEnum):
# class FlowEvent(models.Model):
# class Statistics(models.Model):
#     class Meta:
# class AerisData(models.Model):
#     SPOTTING = 0
#     LIGHT = 1
#     MEDIUM = 2
#     HEAVY = 3
#     VERY_HEAVY = 4
#     PINK = 0
#     LIGHT_RED = 1
#     RED = 2
#     DARK_RED = 3
#     BROWN = 4
#     BLACK = 5
#     SMALL = 0
#     MEDIUM = 1
#     LARGE = 2
#     SLIGHT = 0
#     MODERATE = 1
#     SEVERE = 2
# 
# Path: periods/management/commands/email_active_users.py
# class Command(BaseCommand):
#     def add_arguments(self, parser):
#     def handle(self, *args, **options):
# 
# Path: periods/tests/factories.py
# class FlowEventFactory(factory.DjangoModelFactory):
#     class Meta:
#         model = period_models.FlowEvent
# 
#     user = factory.SubFactory(UserFactory)
#     timestamp = pytz.utc.localize(datetime.datetime(2014, 1, 31, 17, 0, 0))
#     first_day = True


# Path: periods/tests/management/commands/test_email_active_users.py
import datetime
import pytz
from django.test import TestCase
from mock import patch
from periods import models as period_models
from periods.management.commands import email_active_users
from periods.tests.factories import FlowEventFactory




TIMEZONE = pytz.timezone("US/Eastern")


class TestCommand(TestCase):
    def setUp(self):
        self.command = email_active_users.Command()
        flow_event = FlowEventFactory()
        self.user = flow_event.user

        FlowEventFactory(user=self.user,