From 07bf94c65cf1d39ea892e136d8d771a83ed09a98 Mon Sep 17 00:00:00 2001 From: woorst Date: Tue, 28 Jun 2016 07:32:51 -0500 Subject: [PATCH] Add tests for tests_content_subreddit_from_name --- tests/test_content.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_content.py b/tests/test_content.py index 41a0e74..bc9ee2e 100644 --- a/tests/test_content.py +++ b/tests/test_content.py @@ -240,6 +240,16 @@ def test_content_subreddit_from_name(reddit, terminal): assert content.name == '/r/python' assert content.order is None + name = '/domain/python.org' + content = SubredditContent.from_name(reddit, name, terminal.loader) + assert content.name == '/domain/python.org' + assert content.order is None + + name = '/user/spez' + content = SubredditContent.from_name(reddit, name, terminal.loader) + assert content.name == '/user/spez' + assert content.order is None + # Can submit without the /r/ and with the order in the name name = 'python/top/' content = SubredditContent.from_name(reddit, name, terminal.loader)