コード例 #1
0
ファイル: test_fetch.py プロジェクト: shellydeforte/PDB
 def test_download_and_write_data_pass(self):
     new = ss._new_filenames()
     expected_fp = os.path.join(
         self.temp_dir,
         new.raw
     )
     ss._download_ss_data(expected_fp)
     self.assertTrue(os.path.isfile(expected_fp))
     return None
コード例 #2
0
    def test_new_filenames_pass(self):
        estimated_time = now_utc()
        result_names = ss._new_filenames()
        json_base, json_time, json_ext = result_names.json.split('.')
        raw_base, raw_time, raw_ext = result_names.raw.split('.')

        self.assertEqual(json_time, raw_time)
        self.assertAlmostEquals(json_time, estimated_time)
        self.assertEqual({json_base, raw_base, 'ss_dis'}, {'ss_dis'})
        self.assertEqual(json_ext, 'json')
        self.assertEqual(raw_ext, 'txt')
        return None