Beispiel #1
0
 def setUp(self):
     self.cmd = LoadCommand()
     self.name = 'ahoy'
     self.url = 'https://south.amazonaws.com/jarbas/1970-01-01-ahoy.xz'
     self.custom_settings = {
         'AMAZON_S3_DATASET_DATE': '1970-01-01',
         'AMAZON_S3_REGION': 'south',
         'AMAZON_S3_BUCKET': 'jarbas'
     }
Beispiel #2
0
 def test_add_arguments_without_drop_all(self):
     mock = Mock()
     LoadCommand().add_arguments(mock, add_drop_all=False)
     self.assertEqual(1, mock.add_argument.call_count)
Beispiel #3
0
 def test_add_arguments(self):
     mock = Mock()
     LoadCommand().add_arguments(mock)
     self.assertEqual(2, mock.add_argument.call_count)
Beispiel #4
0
 def test_drop_all(self, mock_print):
     self.assertEqual(0, Activity.objects.count())
     Activity.objects.create(**sample_activity_data)
     self.assertEqual(1, Activity.objects.count())
     LoadCommand().drop_all(Activity)
     self.assertEqual(0, Activity.objects.count())
Beispiel #5
0
 def setUp(self):
     self.cmd = LoadCommand()
Beispiel #6
0
 def setUp(self):
     self.cmd = LoadCommand()
     self.source = '/whatever/works'
     self.name = 'ahoy'