Skip to content
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

Subscription tests and automatically coerce subscription id to string #36

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

armstrys
Copy link
Contributor

Adding a test that makes sure content in the subscription class is consistent with expected types when converted to json and back. Notably, the current class doesn't force the id to be a string.

I've also removed the default filters value of None since it is currently unused in the body of the function and isn't a valid option for a subscription - maybe it makes sense to replace this with an empty Filters object instead?

Copy link
Owner

@jeffthibault jeffthibault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just added a couple suggestions.

nostr/subscription.py Outdated Show resolved Hide resolved
test/test_subscription.py Show resolved Hide resolved
@armstrys
Copy link
Contributor Author

Those changes both make sense to me!

@armstrys
Copy link
Contributor Author

No worries. This is all helpful to me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants