def setUp(self):
     self.task = LastCountryOfUser(
         mapreduce_engine='local',
         user_country_output='test://output/',
         interval=Year.parse('2013'),
     )
     self.task.init_local()
 def _get_kwargs(self):
     """Provides minimum args for instantiating QueryLastCountryPerCourseWorkflow."""
     return {
         'interval': Year.parse('2013'),
         'user_country_output': 's3://output/user_country/path',
         'course_country_output': 's3://output/course_country/path',
     }
 def _get_kwargs(self):
     """Provides minimum args for instantiating QueryLastCountryPerCourseWorkflow."""
     return {
         'interval': Year.parse('2013'),
         'user_country_output': 's3://output/user_country/path',
         'course_country_output': 's3://output/course_country/path',
     }
 def setUp(self):
     self.task = LastCountryOfUser(
         mapreduce_engine='local',
         user_country_output='test://output/',
         interval=Year.parse('2013'),
     )
     self.task.init_local()
示例#5
0
 def _get_kwargs(self):
     """Provides minimum args for instantiating InsertToMysqlCourseEnrollByCountryWorkflow."""
     return {
         'interval': Year.parse('2013'),
         'course_country_output': 's3://output/course_country/path',
         'credentials': 's3://config/credentials/output-database.json',
     }
 def _get_kwargs(self):
     """Provides minimum args for instantiating InsertToMysqlCourseEnrollByCountryWorkflow."""
     return {
         'interval': Year.parse('2013'),
         'user_country_output': 's3://output/user_country/path',
         'course_country_output': 's3://output/course_country/path',
         'credentials': 's3://config/credentials/output-database.json',
     }
 def setUp(self):
     self.username = "******"
     self.timestamp = "2013-12-17T15:38:32.805444"
     self.earlier_timestamp = "2013-12-15T15:38:32.805444"
     self.task = LastCountryOfUser(
         mapreduce_engine='local',
         user_country_output='test://output/',
         interval=Year.parse('2014'),
     )
     self.task.geoip = FakeGeoLocation()
 def setUp(self):
     self.username = "******"
     self.timestamp = "2013-12-17T15:38:32.805444"
     self.earlier_timestamp = "2013-12-15T15:38:32.805444"
     self.task = LastCountryOfUser(
         mapreduce_engine='local',
         user_country_output='test://output/',
         interval=Year.parse('2014'),
     )
     self.task.geoip = FakeGeoLocation()
    def _create_export_task(self, **kwargs):
        task = EventExportTask(mapreduce_engine='local',
                               output_root='test://output/',
                               config='test://config/default.yaml',
                               source=['test://input/'],
                               environment='prod',
                               interval=Year.parse('2014'),
                               gpg_key_dir='test://config/gpg-keys/',
                               gpg_master_key='*****@*****.**',
                               **kwargs)

        task.input_local = MagicMock(return_value=FakeTarget(
            value=self.CONFIGURATION))
        return task
    def _create_export_task(self, **kwargs):
        task = EventExportTask(
            mapreduce_engine='local',
            output_root='test://output/',
            config='test://config/default.yaml',
            source=['test://input/'],
            environment='prod',
            interval=Year.parse('2014'),
            gpg_key_dir='test://config/gpg-keys/',
            gpg_master_key='*****@*****.**',
            **kwargs
        )

        task.input_local = MagicMock(return_value=FakeTarget(self.CONFIGURATION))
        return task
 def _get_kwargs(self):
     """Provides minimum args for instantiating LastCountryOfUserPartitionTask."""
     return {
         'interval': Year.parse('2013'),
     }
 def _get_kwargs(self):
     """Provides minimum args for instantiating ImportLastCountryOfUserToHiveTask."""
     return {
         'interval': Year.parse('2013'),
         'user_country_output': 's3://output/path',
     }
 def _get_kwargs(self):
     """Provides minimum args for instantiating InsertToMysqlLastCountryPerCourseTask."""
     return {
         'interval': Year.parse('2013'),
     }
 def _get_kwargs(self):
     """Provides minimum args for instantiating LastCountryOfUserPartitionTask."""
     return {
         'interval': Year.parse('2013'),
     }
 def _get_kwargs(self):
     """Provides minimum args for instantiating ImportLastCountryOfUserToHiveTask."""
     return {
         'interval': Year.parse('2013'),
         'user_country_output': 's3://output/path',
     }
 def _get_kwargs(self):
     """Provides minimum args for instantiating InsertToMysqlLastCountryPerCourseTask."""
     return {
         'interval': Year.parse('2013'),
     }
示例#17
0
 def _get_kwargs(self):
     """Provides minimum args for instantiating ImportLastCountryOfUserToHiveTask."""
     return {
         'interval': Year.parse('2013'),
     }