Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
url-checker
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
url-checker
Commits
3aad5b21
Commit
3aad5b21
authored
Nov 29, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MORE TEST
parent
4dc7faf6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
test_urlchecker_db.py
test_urlchecker_db.py
+1
-1
test_urlchecker_dns.py
test_urlchecker_dns.py
+27
-0
No files found.
test_urlchecker_db.py
View file @
3aad5b21
...
...
@@ -3,7 +3,7 @@ from urlchecker_db import LogDB
import
peewee
class
UrlChecker
Network
TestCase
(
unittest
.
TestCase
):
class
UrlChecker
DB
TestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
db
=
LogDB
(
":memory:"
)
...
...
test_urlchecker_dns.py
0 → 100644
View file @
3aad5b21
import
unittest
from
urlchecker_db
import
LogDB
import
peewee
from
urlchecker_dns
import
expandDomainList
class
UrlCheckerDNSTestCase
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
db
=
LogDB
(
":memory:"
)
self
.
db
.
createTables
()
################################################
# expandDomainList
################################################
def
test_expandDomainList
(
self
):
result
=
expandDomainList
([
"c"
,
"b.a.a"
,
"a.a.a"
,
"a.a"
])
assert
result
==
[
"a.a"
,
"a.a.a"
,
"b.a.a"
,
"c"
]
def
suite
():
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
UrlCheckerDNSTestCase
))
return
suite
if
__name__
==
"__main__"
:
unittest
.
main
(
defaultTest
=
"suite"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment