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

Fix TypeError in mock driver initialization #869

Merged
merged 1 commit into from
Nov 21, 2018

Conversation

nabnux
Copy link

@nabnux nabnux commented Nov 21, 2018

I stumbled upon this error during my tests:
TypeError: 'NoneType' object is not subscriptable

This is due to the fact that I was initializing the MockDriver without specifying a path to mock data in the optional_args. Or at this point in my tests I don't need the mock data so I'd like to be able to instantiate the driver with a default value.

This change provides a default value for the path to the mocked results
in MockDriver.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 80.37% when pulling 3f5f9c3 on nabnut:develop into 892c3ea on napalm-automation:develop.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 80.37% when pulling 3f5f9c3 on nabnut:develop into 892c3ea on napalm-automation:develop.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 80.37% when pulling 3f5f9c3 on nabnut:develop into 892c3ea on napalm-automation:develop.

@ktbyers ktbyers merged commit 314b4c9 into napalm-automation:develop Nov 21, 2018
ExaneServerTeam pushed a commit to ExaneServerTeam/napalm that referenced this pull request Mar 6, 2020
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.

3 participants