def test_get_definitions_filepath(self, mocked_pathmapper_get_conf_path): """ Ensure Definitions.get_definitions_filepath works as expected """ mocked_pathmapper_get_conf_path.return_value = 'configPath' self.assertEqual(Definitions.get_definitions_filepath(), os.path.join('configPath', Definitions.DEFINITIONS_FILE))
def test_get_definitions_filepath(self, mocked_fileops, mocked_pathmapper_get_conf_path): """ Ensure Definitions.get_definitions_filepath properly delegates to fileops """ mocked_fileops.join_path.return_value = 'hi' mocked_pathmapper_get_conf_path.return_value = 'lol' self.assertEqual(Definitions.get_definitions_filepath(), 'hi') mocked_fileops.join_path.assert_called_with('lol', Definitions.DEFINITIONS_FILE)