Closed cobanov closed 1 year ago
taking a look.....
This change causes 2 tests to fail:
F....F..
======================================================================
FAIL: test_follow (tests.test_main.TestSessionLogin)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/atprototools/tests/test_main.py", line 35, in test_follow
self.assertEqual(resp.status_code, 200)
AssertionError: 400 != 200
======================================================================
FAIL: test_post_skoot (tests.test_main.TestSessionLogin)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/atprototools/tests/test_main.py", line 54, in test_post_skoot
self.assertEqual(resp.status_code, 200)
AssertionError: 400 != 200
----------------------------------------------------------------------
Ran 8 tests in 7.731s
FAILED (failures=2)
In test_follow
and follow
,
The record is expected to contain "repo": "did:plc:blahblahblah"
Splitting the DID sends only blahblahblah
.
It might be better to manually put did:plc in follow
, but I'm not sure.
What do you think? ^^
(thanks for the PR!)
as you can see here each function which using 'DID'
expecting in that format, what do you think maybe we can init another attribute self.DID_key
maybe?
https://gist.github.com/cobanov/023f497e6790b74e79c44c76ce67e68b
i think it might be better to have the user manually do a session.DID.split(":")[-1]
or add did:plc:
back whenever they need to ^^
although, atprototools is a bit inconsistent in some places (e.g. usage of did vs username, which_case theCodeIsUsing). that would be a good thing to look at ^^
here's the related issue ^^ https://github.com/ianklatzco/atprototools/issues/12
Previously, the code was not parsed the DID response correctly, resulting in incorrect data being parsed. This commit fixes the issue by properly splitting and parsing the DID.