コード例 #1
0
 def setUp(self):
     self.task = LastCountryOfUser(
         mapreduce_engine='local',
         user_country_output='test://output/',
         interval=Year.parse('2013'),
     )
     self.task.init_local()
コード例 #2
0
 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',
     }
コード例 #3
0
 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',
     }
コード例 #4
0
 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',
     }
コード例 #6
0
 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',
     }
コード例 #7
0
 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()
コード例 #8
0
 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()
コード例 #9
0
    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
コード例 #10
0
    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
コード例 #11
0
 def _get_kwargs(self):
     """Provides minimum args for instantiating LastCountryOfUserPartitionTask."""
     return {
         'interval': Year.parse('2013'),
     }
コード例 #12
0
 def _get_kwargs(self):
     """Provides minimum args for instantiating ImportLastCountryOfUserToHiveTask."""
     return {
         'interval': Year.parse('2013'),
         'user_country_output': 's3://output/path',
     }
コード例 #13
0
 def _get_kwargs(self):
     """Provides minimum args for instantiating InsertToMysqlLastCountryPerCourseTask."""
     return {
         'interval': Year.parse('2013'),
     }
コード例 #14
0
 def _get_kwargs(self):
     """Provides minimum args for instantiating LastCountryOfUserPartitionTask."""
     return {
         'interval': Year.parse('2013'),
     }
コード例 #15
0
 def _get_kwargs(self):
     """Provides minimum args for instantiating ImportLastCountryOfUserToHiveTask."""
     return {
         'interval': Year.parse('2013'),
         'user_country_output': 's3://output/path',
     }
コード例 #16
0
 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'),
     }