Add tests for tests_content_subreddit_from_name

This commit is contained in:
woorst
2016-06-28 07:32:51 -05:00
parent 8fd4950f5b
commit 1d1a5a7b36

View File

@@ -240,6 +240,16 @@ def test_content_subreddit_from_name(reddit, terminal):
assert content.name == '/r/python' assert content.name == '/r/python'
assert content.order is None 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 # Can submit without the /r/ and with the order in the name
name = 'python/top/' name = 'python/top/'
content = SubredditContent.from_name(reddit, name, terminal.loader) content = SubredditContent.from_name(reddit, name, terminal.loader)