Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
silkaj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
silkaj
Commits
ce759a4e
Commit
ce759a4e
authored
3 years ago
by
Moul
Browse files
Options
Downloads
Patches
Plain Diff
[mod] test_membership_cmd: always success status code
parent
a7460221
No related branches found
No related tags found
1 merge request
!182
#390, #396, #407: Drop async, send_doc(), Documents BBC
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_membership.py
+8
-8
8 additions, 8 deletions
tests/test_membership.py
with
8 additions
and
8 deletions
tests/test_membership.py
+
8
−
8
View file @
ce759a4e
...
...
@@ -38,7 +38,7 @@ from patched.wot import (
from
silkaj
import
auth
,
membership
,
wot
from
silkaj.blockchain_tools
import
BlockchainParams
,
HeadBlock
from
silkaj.cli
import
cli
from
silkaj.constants
import
DATE
,
FAILURE_EXIT_STATUS
,
SUCCESS_EXIT_STATUS
from
silkaj.constants
import
DATE
,
SUCCESS_EXIT_STATUS
from
silkaj.network_tools
import
ClientInstance
from
silkaj.tui
import
display_pubkey_and_checksum
...
...
@@ -65,15 +65,15 @@ def patched_choose_identity(pubkey):
@pytest.mark.parametrize
(
"
dry_run, display, confirmation
, exit_code
"
,
"
dry_run, display, confirmation
"
,
[
(
True
,
False
,
False
,
SUCCESS_EXIT_STATUS
),
(
False
,
True
,
False
,
SUCCESS_EXIT_STATUS
),
(
False
,
True
,
True
,
FAILURE_EXIT_STATUS
),
(
False
,
False
,
True
,
FAILURE_EXIT_STATUS
),
(
True
,
False
,
False
),
(
False
,
True
,
False
),
(
False
,
True
,
True
),
(
False
,
False
,
True
),
],
)
def
test_membership_cmd
(
dry_run
,
display
,
confirmation
,
exit_code
,
monkeypatch
):
def
test_membership_cmd
(
dry_run
,
display
,
confirmation
,
monkeypatch
):
# Monkeypatch and Mock
monkeypatch
.
setattr
(
auth
,
"
auth_method
"
,
patched_auth_method
)
monkeypatch
.
setattr
(
HeadBlock
,
"
get_head
"
,
patched_head_block
)
...
...
@@ -125,7 +125,7 @@ def test_membership_cmd(dry_run, display, confirmation, exit_code, monkeypatch):
# signing_key,
# )
assert
result
.
exit_code
==
exit_code
assert
result
.
exit_code
==
SUCCESS_EXIT_STATUS
@pytest.mark.parametrize
(
...
...
This diff is collapsed.
Click to expand it.
Moul
@moul
mentioned in commit
3bed85e9
·
3 years ago
mentioned in commit
3bed85e9
mentioned in commit 3bed85e983a435ba6258fd3950a1bf6b0ca130de
Toggle commit list
Moul
@moul
mentioned in commit
cdfccba3
·
3 years ago
mentioned in commit
cdfccba3
mentioned in commit cdfccba398936d3b4076343b210ab12713da3b5c
Toggle commit list
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