Skip to content

fix: bytes encoding error "string argument without an encoding" #976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: v1.2.6
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 43 additions & 39 deletions src/keri/core/eventing.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/app/test_agenting.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_witness_sender(seeder):

# looks like bad magic value in seeder is causing this to fail
pdoer = PublishDoer(wanHby, wilHby, wesHby, palHby, seeder)
directing.runController(doers=[pdoer], expire=15.0)
directing.runController(doers=[pdoer], expire=10.0)
assert pdoer.done is True


Expand Down
21 changes: 16 additions & 5 deletions tests/app/test_querying.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@
keri.app.querying module

"""
import logging

from hio.base import doing

from keri import help
from keri.app import habbing
from keri.app.querying import QueryDoer, KeyStateNoticer, LogQuerier, SeqNoQuerier, AnchorQuerier
from keri.core import parsing, eventing, serdering
from keri.db.dbing import dgKey


logger = help.ogler.getLogger()


def test_querying():
logger.setLevel(logging.TRACE) # gives test coverage to trace level logging blocks
with habbing.openHby() as hby, \
habbing.openHby() as hby1:
inqHab = hby.makeHab(name="inquisitor")
Expand Down Expand Up @@ -150,13 +157,17 @@ def test_querying():
assert len(adoer.witq.msgs) == 1

def test_query_not_found_escrow():
with habbing.openHby() as hby, \
habbing.openHby() as hby1:
inqHab = hby.makeHab(name="inquisitor")
subHab = hby1.makeHab(name="subject")
logger.setLevel(logging.TRACE) # gives test coverage to trace level logging blocks
with habbing.openHby() as inqHby, \
habbing.openHby() as subHby:
inqHab = inqHby.makeHab(name="inquisitor")
subHab = subHby.makeHab(name="subject")

psr = parsing.Parser()

icp = inqHab.makeOwnInception()
subHab.psr.parseOne(ims=icp)
subKvy = eventing.Kevery(db=subHab.db, lax=False, local=False)
psr.parseOne(ims=bytearray(icp), kvy=subKvy)
assert inqHab.pre in subHab.kevers

qry = inqHab.query(subHab.pre, route="/foo", src=inqHab.pre)
Expand Down
8 changes: 6 additions & 2 deletions tests/core/test_delegating.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
tests delegation primaily from keri.core.eventing

"""
import logging
import os

from keri import help
Expand Down Expand Up @@ -288,8 +289,8 @@ def test_delegation_supersede():

Three level delegation
top is at top or root level with witness wop. top is not delegated
mid is at mid level with witness wid. mid is delegatred from top
bot is at bottom level with wintess wot. bot is delegated from mid
mid is at mid-level with witness wid. mid is delegated from top
bot is at bottom level with witness wot. bot is delegated from mid


def test_load_event(mockHelpingNowUTC):
Expand Down Expand Up @@ -464,6 +465,7 @@ def test_load_event(mockHelpingNowUTC):
assert count >= 1

# This needs to be fixedup to actually test delegating superseding recovery
# TODO?
with (basing.openDB(name="bob") as bobDB,
keeping.openKS(name="bob") as bobKS,
basing.openDB(name="del") as delDB,
Expand Down Expand Up @@ -722,6 +724,7 @@ def test_load_event(mockHelpingNowUTC):
def test_delegables_escrow():
gateSalt = core.Salter(raw=b'0123456789abcdef').qb64
torSalt = core.Salter(raw=b'0123456789defabc').raw
logger.setLevel(logging.TRACE) # gives test coverage to trace level logging blocks

with habbing.openHby(name="delegate", temp=True, salt=gateSalt) as gateHby, \
habbing.openHab(name="delegator", temp=True, salt=torSalt) as (torHby, torHab):
Expand Down Expand Up @@ -773,4 +776,5 @@ def test_delegables_escrow():
if __name__ == "__main__":
test_delegation()
test_delegation_supersede()
test_delegables_escrow()

Loading
Loading