Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
a06824e9
Commit
a06824e9
authored
6 years ago
by
roadscape
Browse files
Options
Downloads
Patches
Plain Diff
use posts pre-3m for condenser api tests
parent
0b220ea8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/server/test_server_condenser_api.py
+8
-8
8 additions, 8 deletions
tests/server/test_server_condenser_api.py
tests/server/test_server_condenser_api_disc.py
+12
-12
12 additions, 12 deletions
tests/server/test_server_condenser_api_disc.py
with
20 additions
and
20 deletions
tests/server/test_server_condenser_api.py
+
8
−
8
View file @
a06824e9
...
@@ -14,13 +14,13 @@ async def test_get_state():
...
@@ -14,13 +14,13 @@ async def test_get_state():
assert
await
get_state
(
'
created
'
)
assert
await
get_state
(
'
created
'
)
assert
await
get_state
(
'
hot
'
)
assert
await
get_state
(
'
hot
'
)
assert
await
get_state
(
'
@
test-safari
'
)
assert
await
get_state
(
'
@
xeroc
'
)
assert
await
get_state
(
'
@
test-safari
/feed
'
)
assert
await
get_state
(
'
@
xeroc
/feed
'
)
assert
await
get_state
(
'
@
test-safari
/comments
'
)
assert
await
get_state
(
'
@
xeroc
/comments
'
)
assert
await
get_state
(
'
@
test-safari
/recent-replies
'
)
assert
await
get_state
(
'
@
xeroc
/recent-replies
'
)
assert
await
get_state
(
'
s
pam/@test-safari/1ncq2-may-spam
'
)
assert
await
get_state
(
'
s
teem/@xeroc/python-steem-v0-1-1
'
)
assert
await
get_state
(
'
s
pam/@test-safari/october-spam
'
)
assert
await
get_state
(
'
s
teem/@xeroc/re-dercoco-re-xeroc-python-steem-v0-1-1-20160802t073430189z
'
)
assert
await
get_state
(
'
trending/blockchain
'
)
assert
await
get_state
(
'
trending/blockchain
'
)
...
@@ -39,10 +39,10 @@ async def test_get_state():
...
@@ -39,10 +39,10 @@ async def test_get_state():
async
def
test_call
():
async
def
test_call
():
assert
await
call
(
'
condenser_api
'
,
assert
await
call
(
'
condenser_api
'
,
'
get_followers
'
,
'
get_followers
'
,
[
'
test-safari
'
,
''
,
'
blog
'
,
10
])
[
'
xeroc
'
,
''
,
'
blog
'
,
10
])
assert
await
call
(
'
condenser_api
'
,
assert
await
call
(
'
condenser_api
'
,
'
get_discussions_by_blog
'
,
'
get_discussions_by_blog
'
,
[{
"
tag
"
:
"
test-safari
"
,
[{
"
tag
"
:
"
xeroc
"
,
"
start_author
"
:
""
,
"
start_author
"
:
""
,
"
start_permlink
"
:
""
,
"
start_permlink
"
:
""
,
"
limit
"
:
10
}])
"
limit
"
:
10
}])
...
...
This diff is collapsed.
Click to expand it.
tests/server/test_server_condenser_api_disc.py
+
12
−
12
View file @
a06824e9
...
@@ -19,28 +19,28 @@ from hive.server.condenser_api.methods import (
...
@@ -19,28 +19,28 @@ from hive.server.condenser_api.methods import (
@pytest.mark.asyncio
@pytest.mark.asyncio
async
def
test_get_followers
():
async
def
test_get_followers
():
assert
await
get_followers
(
'
test-safari
'
,
''
,
'
blog
'
,
10
)
assert
await
get_followers
(
'
xeroc
'
,
''
,
'
blog
'
,
10
)
@pytest.mark.asyncio
@pytest.mark.asyncio
async
def
test_get_following
():
async
def
test_get_following
():
assert
await
get_following
(
'
test-safari
'
,
''
,
'
blog
'
,
10
)
assert
await
get_following
(
'
xeroc
'
,
''
,
'
blog
'
,
10
)
@pytest.mark.asyncio
@pytest.mark.asyncio
async
def
test_get_follow_count
():
async
def
test_get_follow_count
():
assert
await
get_follow_count
(
'
test-safari
'
)
assert
await
get_follow_count
(
'
xeroc
'
)
@pytest.mark.asyncio
@pytest.mark.asyncio
async
def
test_get_content
():
async
def
test_get_content
():
post
=
await
get_content
(
'
test-safari
'
,
'
december-spam
'
)
post
=
await
get_content
(
'
xeroc
'
,
'
python-steem-0-1
'
)
assert
post
assert
post
assert
post
[
'
author
'
]
==
'
test-safari
'
assert
post
[
'
author
'
]
==
'
xeroc
'
@pytest.mark.asyncio
@pytest.mark.asyncio
async
def
test_get_content_replies
():
async
def
test_get_content_replies
():
replies
=
await
get_content_replies
(
'
test-safari
'
,
'
december-spam
'
)
replies
=
await
get_content_replies
(
'
xeroc
'
,
'
python-steem-0-1
'
)
assert
replies
assert
replies
assert
len
(
replies
)
>
3
assert
len
(
replies
)
>
0
assert
replies
[
0
][
'
author
'
]
assert
replies
[
0
][
'
author
'
]
==
'
puppies
'
@pytest.mark.asyncio
@pytest.mark.asyncio
async
def
test_nested_query_compat
():
async
def
test_nested_query_compat
():
...
@@ -73,17 +73,17 @@ async def test_get_discussions_by_created():
...
@@ -73,17 +73,17 @@ async def test_get_discussions_by_created():
@pytest.mark.asyncio
@pytest.mark.asyncio
async
def
test_get_discussions_by_blog
():
async
def
test_get_discussions_by_blog
():
assert
await
get_discussions_by_blog
(
assert
await
get_discussions_by_blog
(
tag
=
'
test-safari
'
,
start_author
=
''
,
start_permlink
=
''
,
limit
=
20
,
truncate_body
=
0
)
tag
=
'
xeroc
'
,
start_author
=
''
,
start_permlink
=
''
,
limit
=
20
,
truncate_body
=
0
)
@pytest.mark.asyncio
@pytest.mark.asyncio
async
def
test_get_discussions_by_feed
():
async
def
test_get_discussions_by_feed
():
assert
await
get_discussions_by_feed
(
assert
await
get_discussions_by_feed
(
tag
=
'
test-safari
'
,
start_author
=
''
,
start_permlink
=
''
,
limit
=
20
,
truncate_body
=
0
)
tag
=
'
xeroc
'
,
start_author
=
''
,
start_permlink
=
''
,
limit
=
20
,
truncate_body
=
0
)
@pytest.mark.asyncio
@pytest.mark.asyncio
async
def
test_get_discussions_by_comments
():
async
def
test_get_discussions_by_comments
():
assert
await
get_discussions_by_comments
(
assert
await
get_discussions_by_comments
(
start_author
=
'
test-safari
'
,
start_author
=
'
xeroc
'
,
start_permlink
=
''
,
start_permlink
=
''
,
limit
=
20
,
limit
=
20
,
truncate_body
=
0
)
truncate_body
=
0
)
...
@@ -91,7 +91,7 @@ async def test_get_discussions_by_comments():
...
@@ -91,7 +91,7 @@ async def test_get_discussions_by_comments():
@pytest.mark.asyncio
@pytest.mark.asyncio
async
def
test_get_replies_by_last_update
():
async
def
test_get_replies_by_last_update
():
assert
await
get_replies_by_last_update
(
assert
await
get_replies_by_last_update
(
start_author
=
'
test-safari
'
,
start_author
=
'
xeroc
'
,
start_permlink
=
''
,
start_permlink
=
''
,
limit
=
20
,
limit
=
20
,
truncate_body
=
0
)
truncate_body
=
0
)
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