test for the strip_bz2_extension method (#24826)

old-commit-hash: 1847a70a47b12ff5c7e7db9361f69d6d1e79a919
This commit is contained in:
Maykon Pacheco
2022-06-11 14:08:24 -04:00
committed by GitHub
parent 1c748eb9ac
commit fe24326066
+7
View File
@@ -120,6 +120,13 @@ class TestAthenadMethods(unittest.TestCase):
self.assertTrue(resp, 'list empty!')
self.assertCountEqual(resp, expected)
def test_strip_bz2_extension(self):
fn = os.path.join(athenad.ROOT, 'qlog.bz2')
Path(fn).touch()
if fn.endswith('.bz2'):
self.assertEqual(athenad.strip_bz2_extension(fn), fn[:-4])
@with_http_server
def test_do_upload(self, host):
fn = os.path.join(athenad.ROOT, 'qlog.bz2')