コード例 #1
0
 def test_set_names(self, model: Model, mock_ttg: Mock):
     model._journals = ['', 'c', 'd']
     model._journal_mapping = {'c': 'e', 'd': 'f'}
     model._journal_index = 1
     model.set_names()
     assert model.names == ['', 'a', 'b']
     assert model._name_mapping == {'a': '1', 'b': '2'}
コード例 #2
0
 def test_journal(self, model: Model):
     model._journals = ['', 'c', 'd']
     assert model.journal is None
     model._journal_index = 1
     assert model.journal == 'c'
コード例 #3
0
 def test_sheet_id(self, model: Model):
     model._journals = ['', 'c', 'd']
     model._journal_mapping = {'c': 'e', 'd': 'f'}
     assert model.sheet_id is None
     model._journal_index = 1
     assert model.sheet_id == 'e'
コード例 #4
0
 def test_journals(self, model: Model):
     assert model.journals == []
     model._journals = ['', 'c', 'd']
     assert model.journals == ['', 'c', 'd']