Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage-1
Commits
9f376f53
Commit
9f376f53
authored
Nov 27, 2015
by
labrys
Browse files
Options
Downloads
Patches
Plain Diff
Lint 10/10
parent
97bae360
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/feedparser_tests.py
+21
-9
21 additions, 9 deletions
tests/feedparser_tests.py
with
21 additions
and
9 deletions
tests/feedparser_tests.py
+
21
−
9
View file @
9f376f53
import
sys
,
os
.
path
# coding=utf-8
sys
.
path
.
insert
(
1
,
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
../lib
'
)))
sys
.
path
.
insert
(
1
,
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
..
'
)))
"""
Test Feed Parser
"""
import
sys
import
os.path
import
unittest
sys
.
path
.
insert
(
1
,
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
../lib
'
)))
sys
.
path
.
insert
(
1
,
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
..
'
)))
from
sickbeard.providers.womble
import
provider
as
womble
class
FeedParserTests
(
unittest
.
TestCase
):
# pylint: disable=W0212
"""
Test feed parser
"""
def
test_womble
(
self
):
"""
Test womble
"""
result
=
womble
.
cache
.
getRSSFeed
(
'
http://newshost.co.za/rss/?sec=tv-sd&fr=false
'
)
self
.
assertTrue
(
'
entries
'
in
result
)
self
.
assertTrue
(
'
feed
'
in
result
)
for
item
in
result
[
'
entries
'
]
or
[]:
title
,
url
=
womble
.
_get_title_and_url
(
item
)
title
,
url
=
womble
.
_get_title_and_url
(
item
)
# pylint: disable=protected-access
self
.
assertTrue
(
title
and
url
)
if
__name__
==
"
__main__
"
:
...
...
@@ -22,8 +34,8 @@ if __name__ == "__main__":
print
"
STARTING - FEED PARSER TESTS
"
print
"
==================
"
print
"
######################################################################
"
suite
=
unittest
.
TestLoader
().
loadTestsFromTestCase
(
FeedParserTests
)
testresults
=
unittest
.
TextTestRunner
(
verbosity
=
2
).
run
(
suite
)
SUITE
=
unittest
.
TestLoader
().
loadTestsFromTestCase
(
FeedParserTests
)
TEST_RESULTS
=
unittest
.
TextTestRunner
(
verbosity
=
2
).
run
(
SUITE
)
# Return 0 if successful, 1 if there was a failure
sys
.
exit
(
not
testresults
.
wasSuccessful
())
sys
.
exit
(
not
TEST_RESULTS
.
wasSuccessful
())
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment