def test_get_current_params_simple(self): data = json.loads(self.data) writer = Writer(data, content = '') test_dict = writer.get_current_params() self.assertEqual(test_dict['-t'], data['CL-params']['-t']) self.assertEqual(test_dict['-o'], '~/tmp/out.csv') self.assertEqual(test_dict['-f'], data['CL-params']['-f']) self.assertEqual(test_dict['--cloud'], "~/storage-credentials.json clopper-storage") [self.assertNotIn(item, test_dict) for item in self.mapping]
def test_get_current_params_extended(self): data = json.loads(self.data) for item in self.mapping: data['CL-params'][item] = 'foo' writer = Writer(data, content = '') test_dict = writer.get_current_params() self.assertEqual(test_dict['-t'], data['CL-params']['-t']) self.assertEqual(test_dict['-o'], '~/tmp/out.csv') self.assertEqual(test_dict['-f'], data['CL-params']['-f']) [self.assertEqual(test_dict[item], 'foo') for item in self.mapping]