-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Testing Gmp #16
Merged
Merged
Testing Gmp #16
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With this class it is possible to mock functions and methods. It can be used easily as a decorator. Simple and stupid example: ```python3 func = CallableMock() func.return_value('foo') self.assertEqual(func('bar'), 'foo') func.has_been_called() func.has_been_called_with('bar') ```
This class can be used to mock connections for testing.
The GmpCommandFactory shouldn't be tested. It's only a implementation detail. With this changes the data send over the connection is tested now.
Codecov Report
@@ Coverage Diff @@
## master #16 +/- ##
==========================================
+ Coverage 14.73% 22.76% +8.03%
==========================================
Files 9 9
Lines 2029 2029
==========================================
+ Hits 299 462 +163
+ Misses 1730 1567 -163
Continue to review full report at Codecov.
|
Make it easier to use XmlCommands inside of GvmProtocol implementations.
The class will be used if an invalid argument/parameter is passed to some command.
Also adjust the possible filter types. This may break outside usage e.g. passing "Port List" isn't possible anymore. It must contain an underscore now. It shouldn't have been possible before to use those types but maybe we have to allow them in future again.
wiegandm
reviewed
Nov 6, 2018
wiegandm
previously approved these changes
Nov 6, 2018
wiegandm
requested changes
Nov 6, 2018
wiegandm
approved these changes
Nov 6, 2018
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First test for testing Gmp class instead of the GmpCommandFactory