示例#1
0
 def test_generate_explicit_output(self):
     with tempdir() as temp_dir:
         with mock_system_call() as mock_system:
             generate(self.db_rw, 's3_bucket',
                      self.raven_client, self.stats_client,
                      upload=False, concurrency=1,
                      datamaps='', output=temp_dir)
             mock_calls = mock_system.mock_calls
             self.assertEqual(len(mock_calls), 3)
示例#2
0
 def test_generate_explicit_output(self):
     with tempdir() as temp_dir:
         with mock_system_call() as mock_system:
             generate(self.db_master, 's3_bucket',
                      self.heka_client, self.stats_client,
                      upload=False, concurrency=1,
                      datamaps='', output=temp_dir)
             mock_calls = mock_system.mock_calls
             self.assertEqual(len(mock_calls), 3)
示例#3
0
 def test_main(self):
     with tempdir() as temp_dir:
         with mock_system_call() as mock_system:
             argv = [
                 'bin/location_map',
                 '--create',
                 '--concurrency=1',
                 '--datamaps=%s' % temp_dir,
                 '--output=%s' % temp_dir,
             ]
             main(argv,
                  _db_rw=self.db_rw,
                  _raven_client=self.raven_client,
                  _stats_client=self.stats_client)
             mock_calls = mock_system.mock_calls
             self.assertEqual(len(mock_calls), 3)
示例#4
0
 def test_main(self):
     with tempdir() as temp_dir:
         with mock_system_call() as mock_system:
             argv = [
                 'bin/location_map',
                 '--create',
                 '--concurrency=1',
                 '--datamaps=%s' % temp_dir,
                 '--output=%s' % temp_dir,
             ]
             main(argv,
                  _db_master=self.db_master,
                  _heka_client=self.heka_client,
                  _stats_client=self.stats_client)
             mock_calls = mock_system.mock_calls
             self.assertEqual(len(mock_calls), 3)