Exemple #1
0
 def test_build_file_eur(self):
     json_file = api.build_file(repo_token=Arguments.repo_token,
                                service_job_id=Arguments.service_job_id,
                                service_name=Arguments.service_name,
                                git=GIT_EXP,
                                source_files=SOURCE_FILES)
     self.assertEqual(
         json.loads(json_file.read())['source_files'][1]['source'],
         u'# coding=utf-8\nEUR = "€"\n\n\ndef amount(tariff, currency=EUR):\n    return \'{0} {1:.2f}\'.format(currency, float(tariff))'
     )
Exemple #2
0
 def test_build_file_eur(self):
     json_file = api.build_file(
         repo_token=Arguments.repo_token,
         service_job_id=Arguments.service_job_id,
         service_name=Arguments.service_name,
         git=GIT_EXP,
         source_files=SOURCE_FILES,
     )
     self.assertEqual(
         json.loads(json_file.read())["source_files"][1]["source"],
         u"# coding=utf-8\nEUR = \"€\"\n\n\ndef amount(tariff, currency=EUR):\n    return '{0} {1:.2f}'.format(currency, float(tariff))",
     )
Exemple #3
0
 def test_build_file_eur(self):
     json_file = api.build_file(
         repo_token=Arguments.repo_token,
         service_job_id=Arguments.service_job_id,
         service_name=Arguments.service_name,
         git=GIT_EXP,
         source_files=SOURCE_FILES,
         parallel=Arguments.parallel
     )
     self.assertEqual(
         json.loads(json_file.read())['source_files'][1]['source'],
         u'# coding=utf-8\nEUR = "€"\n\n\ndef amount(tariff, currency=EUR):\n    return \'{0} {1:.2f}\'.format(currency, float(tariff))'
     )