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
af550fdc
Commit
af550fdc
authored
2 years ago
by
Moul
Browse files
Options
Downloads
Patches
Plain Diff
Move tx_history.py to money.history.py (
#330
)
parent
3266ba0f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!216
#330: Restructure repository
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
silkaj/cli.py
+1
-1
1 addition, 1 deletion
silkaj/cli.py
silkaj/money/history.py
+0
-0
0 additions, 0 deletions
silkaj/money/history.py
tests/money/test_history.py
+8
-7
8 additions, 7 deletions
tests/money/test_history.py
with
9 additions
and
8 deletions
silkaj/cli.py
+
1
−
1
View file @
af550fdc
...
...
@@ -34,8 +34,8 @@ from silkaj.constants import (
from
silkaj.g1_monetary_license
import
license_command
from
silkaj.membership
import
send_membership
from
silkaj.money.balance
import
cmd_amount
from
silkaj.money.history
import
transaction_history
from
silkaj.money.transfer
import
send_transaction
from
silkaj.tx_history
import
transaction_history
from
silkaj.wot
import
id_pubkey_correspondence
,
received_sent_certifications
...
...
This diff is collapsed.
Click to expand it.
silkaj/
tx_
history.py
→
silkaj/
money/
history.py
+
0
−
0
View file @
af550fdc
File moved
This diff is collapsed.
Click to expand it.
tests/test_
tx_
history.py
→
tests/
money/
test_history.py
+
8
−
7
View file @
af550fdc
...
...
@@ -15,9 +15,10 @@
import
pytest
from
silkaj
import
tx_history
,
wot_tools
from
silkaj
import
wot_tools
from
silkaj.constants
import
PUBKEY_MAX_LENGTH
,
PUBKEY_MIN_LENGTH
,
SHORT_PUBKEY_SIZE
from
silkaj.crypto_tools
import
CHECKSUM_SIZE
from
silkaj.money
import
history
from
tests.patched.blockchain_tools
import
currency
from
tests.patched.tx_history
import
patched_get_transactions_history
from
tests.patched.wot
import
patched_identities_from_pubkeys
...
...
@@ -35,7 +36,7 @@ MAX_FULL_PUBKEY_LENGTH_WITH_CHECKSUM = (
)
# char `:` ==> 44 + 3 + 1 = 48
def
test_
tx_
history_generate_txs_list_and_pubkey_uid_display
(
monkeypatch
):
def
test_history_generate_txs_list_and_pubkey_uid_display
(
monkeypatch
):
def
min_pubkey_length_with_uid
(
pubkey
):
# uid is at least one char : "<uid> - <pubkey>" adds min 4 chars to <pubkey>
return
pubkey
+
4
...
...
@@ -53,7 +54,7 @@ def test_tx_history_generate_txs_list_and_pubkey_uid_display(monkeypatch):
patched_get_transactions_history
(
client
,
pubkey
,
received_txs
,
sent_txs
)
# simple table
txs_list
=
tx_
history
.
generate_txs_list
(
txs_list
=
history
.
generate_txs_list
(
received_txs
,
sent_txs
,
pubkey
,
...
...
@@ -68,7 +69,7 @@ def test_tx_history_generate_txs_list_and_pubkey_uid_display(monkeypatch):
assert
len
(
tx_list
[
1
])
==
SHORT_PUBKEY_LENGTH_WITH_CHECKSUM
# with uids
txs_list_uids
=
tx_
history
.
generate_txs_list
(
txs_list_uids
=
history
.
generate_txs_list
(
received_txs
,
sent_txs
,
pubkey
,
...
...
@@ -91,7 +92,7 @@ def test_tx_history_generate_txs_list_and_pubkey_uid_display(monkeypatch):
assert
len
(
txs_list_uids
[
3
][
1
])
==
SHORT_PUBKEY_LENGTH_WITH_CHECKSUM
# with full pubkeys
txs_list_full
=
tx_
history
.
generate_txs_list
(
txs_list_full
=
history
.
generate_txs_list
(
received_txs
,
sent_txs
,
pubkey
,
...
...
@@ -111,7 +112,7 @@ def test_tx_history_generate_txs_list_and_pubkey_uid_display(monkeypatch):
)
# with full pubkeys and uids
txs_list_uids_full
=
tx_
history
.
generate_txs_list
(
txs_list_uids_full
=
history
.
generate_txs_list
(
received_txs
,
sent_txs
,
pubkey
,
...
...
@@ -160,4 +161,4 @@ def test_tx_history_generate_txs_list_and_pubkey_uid_display(monkeypatch):
],
)
def
test_prefix
(
tx_addresses
,
outputs
,
occurence
,
return_value
):
assert
tx_
history
.
prefix
(
tx_addresses
,
outputs
,
occurence
)
==
return_value
assert
history
.
prefix
(
tx_addresses
,
outputs
,
occurence
)
==
return_value
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