diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2018-07-15 13:42:22 +0200 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2018-07-16 11:38:36 +0200 |
commit | e4e82d3b81e50fc69fd4a929ff162f335b644ba0 (patch) | |
tree | 9dae34b7fbf8ea48888657ad138c13a7f5818d3b /tests | |
parent | acf627f3c6a11b462d8cdad21b8e8e82c6b200e5 (diff) |
Add simple test case for helper.parse_mailto
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/helper_test.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/helper_test.py b/tests/helper_test.py index b1300c7d..061ce122 100644 --- a/tests/helper_test.py +++ b/tests/helper_test.py @@ -487,3 +487,15 @@ class TestGetEnv(unittest.TestCase): with mock.patch.dict('os.environ', {self.env_name: custom_path}): self.assertEqual(helper.get_xdg_env(self.env_name, self.default), custom_path) + + +class TestParseMailto(unittest.TestCase): + + def test_parsing_working(self): + uri = 'mailto:test%40example.org?Subject=Re%3A%20Hello\ +&In-Reply-To=%3CC8CE9EFD-CB23-4BC0-B70D-9B7FEAD59F8C%40example.org%3E' + actual = helper.parse_mailto(uri) + expected = ({'To': ['test@example.org'], + 'Subject': ['Re: Hello'], + 'In-reply-to': ['<C8CE9EFD-CB23-4BC0-B70D-9B7FEAD59F8C@example.org>']}, '') + self.assertEqual(actual, expected) |