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

DAG for processing preceding/succeeding titles #140

Merged
merged 5 commits into from
Sep 13, 2022

Conversation

jgreben
Copy link
Contributor

@jgreben jgreben commented Sep 12, 2022

@@ -286,6 +321,8 @@ def post_to_okapi(**kwargs) -> bool:
logger.error(new_record_result.text)
_save_error_record_ids(error_code=new_record_result.status_code, **kwargs)

return new_record_result.json
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the test to pass I had to change this from new_record_result.json() so I am wondering if this is the right thing to return or not?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, this returns the method signature and not the JSON dictionary. I'm seeing some test failures like

    def __getattr__(self, name):
        if name in {'_mock_methods', '_mock_unsafe'}:
            raise AttributeError(name)
        elif self._mock_methods is not None:
            if name not in self._mock_methods or name in _all_magics:
>               raise AttributeError("Mock object has no attribute %r" % name)
E               AttributeError: Mock object has no attribute 'json'

/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/unittest/mock.py:634: AttributeError

Is this similar to what you're seeing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was seeing TypeError: 'dict' object is not callable but using the lambda function as you suggested fixed it.

@jermnelson jermnelson merged commit d8c1361 into main Sep 13, 2022
@jermnelson jermnelson deleted the 142-pre-suc-ceeding-titles branch September 13, 2022 17:41
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.

Handle preceding/succeeding titles
2 participants