test_file_recorder.py 724 Bytes
Newer Older
BO ZHANG's avatar
BO ZHANG committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
Identifier:     KSC-SJ4-tests/test_data_manager.py
Name:           test_data_manager.py
Description:    data manager unit test
Author:         Bo Zhang
Created:        2022-09-13
Modified-History:
    2022-10-10, Bo Zhang, created
    2022-10-10, Bo Zhang, added test for FileRecorder
"""
import unittest
from csst_common.file_recorder import FileRecorder, File


# deprecated in some days
class TestCsstMbiDataManager(unittest.TestCase):
    def setUp(self) -> None:
        self.fr = FileRecorder()

    def test_add_record(self):
        self.fr.add_record(filepath="test1", db=False, comment="the first test")
        self.assertTrue(self.fr[0] == File("test1", db=False, comment="the first test", existence=False))