(self)
| 573 | |
| 574 | class TestTopicDocumentEventHandlerBase(unittest.TestCase): |
| 575 | def setUp(self): |
| 576 | self.session = mock.Mock() |
| 577 | self.file_creator = FileCreator() |
| 578 | |
| 579 | self.tags_dict = {} |
| 580 | |
| 581 | # Make a temporary json index to base information on |
| 582 | self.json_index = self.file_creator.create_file('index.json', '') |
| 583 | with open(self.json_index, 'w') as f: |
| 584 | json.dump(self.tags_dict, f, indent=4, sort_keys=True) |
| 585 | |
| 586 | self.index_patch = mock.patch( |
| 587 | 'awscli.topictags.TopicTagDB.index_file', self.json_index |
| 588 | ) |
| 589 | self.dir_patch = mock.patch( |
| 590 | 'awscli.topictags.TopicTagDB.topic_dir', self.file_creator.rootdir |
| 591 | ) |
| 592 | self.index_patch.start() |
| 593 | self.dir_patch.start() |
| 594 | |
| 595 | def tearDown(self): |
| 596 | self.dir_patch.stop() |
nothing calls this directly
no test coverage detected