old_contents: # MIT License
  # Copyright (c) 2017 MassChallenge, Inc.
  
  from __future__ import unicode_literals
  
  import swapper
  from datetime import (
      date,
      datetime,
      time,
      timedelta,
  )
  from factory import (
      DjangoModelFactory,
      Sequence,
      SubFactory,
  )
  from pytz import utc
  
  from accelerator.apps import AcceleratorConfig
  from accelerator.tests.factories import (
      EntrepreneurFactory,
      ExpertFactory,
  )
  from accelerator.tests.factories.location_factory import LocationFactory
  from accelerator.tests.factories.program_factory import ProgramFactory
  
  MentorProgramOfficeHour = swapper.load_model(AcceleratorConfig.name,
                                               'MentorProgramOfficeHour')
  
  
  class MentorProgramOfficeHourFactory(DjangoModelFactory):
      class Meta:
          model = MentorProgramOfficeHour
  
      program = SubFactory(ProgramFactory)
      mentor = SubFactory(ExpertFactory)
      finalist = SubFactory(EntrepreneurFactory)
      start_date_time = utc.localize(datetime.combine(
          date.today() + timedelta(days=3),
          time(hour=10)))
      end_date_time = utc.localize(datetime.combine(
          date.today() + timedelta(days=3),
          time(hour=12)))
      location = SubFactory(LocationFactory)
      description = Sequence(lambda n: "Description office hour {0}".format(n))
      notify_reservation = True
      topics = Sequence(lambda n: "Topics for test office hour {0}".format(n))
  
new_contents: # MIT License
  # Copyright (c) 2017 MassChallenge, Inc.
  
  from __future__ import unicode_literals
  
  import swapper
  from datetime import (
      date,
      datetime,
      time,
      timedelta,
  )
  from factory import (
      DjangoModelFactory,
      Sequence,
      SubFactory,
  )
  from pytz import utc
  
  from accelerator.apps import AcceleratorConfig
  from accelerator.tests.factories import (
      EntrepreneurFactory,
      ExpertFactory,
  )
  from accelerator.tests.factories.location_factory import LocationFactory
  from accelerator.tests.factories.program_factory import ProgramFactory
  from accelerator.tests.factories.startup_factory import StartupFactory
  
  MentorProgramOfficeHour = swapper.load_model(AcceleratorConfig.name,
                                               'MentorProgramOfficeHour')
  
  
  class MentorProgramOfficeHourFactory(DjangoModelFactory):
      class Meta:
          model = MentorProgramOfficeHour
  
      program = SubFactory(ProgramFactory)
      mentor = SubFactory(ExpertFactory)
      finalist = SubFactory(EntrepreneurFactory)
      startup = SubFactory(StartupFactory)
      start_date_time = utc.localize(datetime.combine(
          date.today() + timedelta(days=3),
          time(hour=10)))
      end_date_time = utc.localize(datetime.combine(
          date.today() + timedelta(days=3),
          time(hour=12)))
      location = SubFactory(LocationFactory)
      description = Sequence(lambda n: "Description office hour {0}".format(n))
      notify_reservation = True
      topics = Sequence(lambda n: "Topics for test office hour {0}".format(n))
  
subject: update mentor program office hour factory