Fix false negative responses from python tests

Closes #2298
Merge pull request #2300 from strk/master-false-negatives

Fix false negative responses from python tests