def test_reading_synchronize_flags_from_notmuch_config(self): with tempfile.NamedTemporaryFile(delete=False) as f: f.write(textwrap.dedent("""\ [maildir] synchronize_flags = true """)) self.addCleanup(os.unlink, f.name) manager = SettingsManager(notmuch_rc=f.name) actual = manager.get_notmuch_setting('maildir', 'synchronize_flags') self.assertTrue(actual)
def test_reading_synchronize_flags_from_notmuch_config(self): with tempfile.NamedTemporaryFile(delete=False) as f: f.write(textwrap.dedent("""\ [maildir] synchronize_flags = true """)) self.addCleanup(os.unlink, f.name) manager = SettingsManager(notmuch_rc=f.name) actual = manager.get_notmuch_setting('maildir', 'synchronize_flags') self.assertTrue(actual)
def test_read_notmuch_config_doesnt_exist(self): with tempfile.NamedTemporaryFile(delete=False) as f: f.write(textwrap.dedent("""\ [accounts] [[default]] realname = That Guy address = [email protected] """)) self.addCleanup(os.unlink, f.name) manager = SettingsManager(alot_rc=f.name) setting = manager.get_notmuch_setting('foo', 'bar') self.assertIsNone(setting)
def test_read_notmuch_config_doesnt_exist(self): with tempfile.NamedTemporaryFile(delete=False) as f: f.write(textwrap.dedent("""\ [accounts] [[default]] realname = That Guy address = [email protected] """)) self.addCleanup(os.unlink, f.name) manager = SettingsManager(alot_rc=f.name) setting = manager.get_notmuch_setting('foo', 'bar') self.assertIsNone(setting)