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

Mock TheSkyX #287

Merged
merged 3 commits into from
Jan 2, 2018
Merged

Mock TheSkyX #287

merged 3 commits into from
Jan 2, 2018

Conversation

wtgee
Copy link
Member

@wtgee wtgee commented Jan 2, 2018

  • Use Mocket to create a fake socket connection.
    • A real connection is used once with --with-hardware theskyx and
      the responses are recorded into a json file. Subsequent tests then
      use the json file to mock the responses
  • Improve errors for TheSkyX

* Use [Mocket](https://github.com/mindflayer/python-mocket) to create
a fake socket connection.
	* A real connection is used once with `--with-hardware theskyx` and
	the responses are recorded into a json file. Subsequent tests then
	use the json file to mock the responses
* Improve errors for TheSkyX
@wtgee wtgee requested a review from a team January 2, 2018 00:20
@codecov
Copy link

codecov bot commented Jan 2, 2018

Codecov Report

Merging #287 into develop will increase coverage by 0.61%.
The diff coverage is 97.14%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #287      +/-   ##
===========================================
+ Coverage    80.66%   81.28%   +0.61%     
===========================================
  Files           46       46              
  Lines         3207     3227      +20     
  Branches       411      412       +1     
===========================================
+ Hits          2587     2623      +36     
+ Misses         474      457      -17     
- Partials       146      147       +1
Impacted Files Coverage Δ
pocs/utils/error.py 94% <100%> (+1.14%) ⬆️
pocs/hardware.py 87.5% <100%> (ø) ⬆️
pocs/utils/theskyx.py 96.15% <96.15%> (+43.65%) ⬆️
pocs/observatory.py 86.2% <0%> (-0.32%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4054113...3f4aa1a. Read the comment docs.

wtgee added 2 commits January 2, 2018 13:37
Couldn't get timeout to work with Mocket although does work with actual
copy of TheSkyX. Removed timeout test but left exception class
@wtgee wtgee merged commit dc2202e into panoptes:develop Jan 2, 2018
@wtgee wtgee deleted the mock-theskyx branch January 2, 2018 03:19
@wtgee wtgee mentioned this pull request Jan 24, 2018
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.

2 participants