Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
searx-engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
searx-engine
Commits
06e070ae
Commit
06e070ae
authored
Apr 23, 2018
by
rinpatch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix string length
parent
c40d8e1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
test_currency_convert.py
tests/unit/engines/test_currency_convert.py
+14
-2
No files found.
tests/unit/engines/test_currency_convert.py
View file @
06e070ae
...
...
@@ -30,8 +30,20 @@ class TestCurrencyConvertEngine(SearxTestCase):
dicto
[
'to_name'
]
=
"United States dollar"
response
=
mock
.
Mock
(
text
=
'a,b,c,d'
,
search_params
=
dicto
)
self
.
assertEqual
(
currency_convert
.
response
(
response
),
[])
body
=
"ddg_spice_currency(
\n
{
\n\"
conversion
\"
:{
\n\"
converted-amount
\"
:
\"
0.5
\"\n
}
\n\"
topConversions
\"
:[
\n
{
\n
},
\n
{
\n
}
\n
]
\n
}
\n
);"
body
=
"""ddg_spice_currency(
{
"conversion":{
"converted-amount": "0.5"
},
"topConversions":[
{
},
{
}
]
}
);
"""
response
=
mock
.
Mock
(
text
=
body
,
search_params
=
dicto
)
results
=
currency_convert
.
response
(
response
)
self
.
assertEqual
(
type
(
results
),
list
)
...
...
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