my.reddit: better handling for legacy reddit config

prior to this change it would error with

    @dataclass
>   class pushshift_config(uconfig.pushshift):
E   AttributeError: type object 'test_config' has no attribute 'pushshift'
This commit is contained in:
Dima Gerasimov 2021-12-23 10:09:18 +00:00 committed by karlicoss
parent 5e9cc2a6a0
commit be21606075
2 changed files with 8 additions and 1 deletions

View file

@ -11,6 +11,11 @@ def test_basic() -> None:
assert len(list(saved())) > 0
def test_comments() -> None:
from my.reddit.all import comments
assert len(list(comments())) > 0
def test_unfav() -> None:
from my.reddit import events, saved
ev = events()