Refactoring the data science solution

`it "raises an error when incorrect keys are provided"`

Which, since the descriptions are very similar, may point to the fact that these two tests are substantially the same.