def test_profile_section(self): """Tests that a config with the chosen profile section loads""" with open(self.config, 'w') as config_file: config_file.writelines(( '[other]\n', 'section.name=other\n', )) settings = slack_emoji_uploader.load_settings(self.config, 'other') self.assertEqual('other', settings.get('section.name'))
def test_default_section(self): """Tests that a config with the default section loads""" with open(self.config, 'w') as config_file: config_file.writelines(( '[DEFAULT]\n', 'section.name=DEFAULT\n', )) settings = slack_emoji_uploader.load_settings(self.config, 'default') self.assertEqual('DEFAULT', settings.get('section.name'))