Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11724231
test_resolvehash.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
test_resolvehash.py
View Options
#!/usr/bin/env python3
# -------------------------------------------------------------
# Resolve hash :: Tests
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Description: Query various sources with a known hash
# like Phabricator, Gerrit or GitHub to offer
# hash information URL from a VCS hash.
# License: BSD-2-Clause
# -------------------------------------------------------------
import
unittest
from
builtins
import
staticmethod
from
unittest_data_provider
import
data_provider
from
resolvehash
import
resolvehash
class
TestResolveHash
(
unittest
.
TestCase
):
def
test_get_search_classes
(
self
):
search_classes
=
resolvehash
.
get_search_classes
()
self
.
assertTrue
(
type
(
search_classes
)
is
list
)
@staticmethod
def
search_classes
():
return
(
tuple
(
resolvehash
.
get_search_classes
()),)
@data_provider
(
search_classes
)
def
test_if_search_classes_provide_search_method
(
self
,
search_class
):
self
.
assertTrue
(
getattr
(
search_class
,
"search"
,
None
),
f
"The class `{search_class.__name__}` does NOT implement the method `search`."
,
)
if
__name__
==
"__main__"
:
unittest
.
main
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Thu, Sep 18, 13:42 (16 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2989373
Default Alt Text
test_resolvehash.py (1 KB)
Attached To
Mode
rRESOLVEHASH Resolve hash
Attached
Detach File
Event Timeline
Log In to Comment