Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Create mock tests #21

Open
selfuryon opened this issue Feb 2, 2019 · 3 comments
Open

Create mock tests #21

selfuryon opened this issue Feb 2, 2019 · 3 comments
Assignees
Milestone

Comments

@selfuryon
Copy link
Owner

Need to create mock tests for fast developing otherwise I need to test all classes after each significant commit to base classes. It's too hard and I can't use it in CI/CD

@selfuryon selfuryon self-assigned this Feb 2, 2019
@selfuryon selfuryon added this to the Release v1.0 milestone Feb 2, 2019
@selfuryon
Copy link
Owner Author

Need to think about how to do it.
Just create a file which class will be read line-by-line? Or something else.

@selfuryon
Copy link
Owner Author

I want to read a particular file when running a particular command, so I'll have files like these:

  • show_run.txt
  • show_ver
  • etc

So when the code needs to run show run command it should read show_run.txt file.

Some thoughts:

  • mock establish_connection() for reading only text files without real ssh connections
  • mock send_command() and send_config_set() for getting the right file
  • maybe need to mock read_until_pattern()

@selfuryon
Copy link
Owner Author

The main goal is to replace self._stdin and self._stdout. I need to create a similar interface like SSHClientSession

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

No branches or pull requests

1 participant