Skip to content Skip to sidebar Skip to footer
Showing posts with the label Unit Testing

Scrapy: Effective Way To Test Inline Requests

I wrote a spider using scrapy-inline-requests library. So the parse method in my spider looks somet… Read more Scrapy: Effective Way To Test Inline Requests

Can't Get Pytest To Understand Command-line Arguments On Setups

So I have been trying to get pytest to run selenium tests on different environments based on some c… Read more Can't Get Pytest To Understand Command-line Arguments On Setups

How To Check For Mock Calls With Wildcards?

I am writing unit tests, and want to check for a call which has a function object, like so: call(u… Read more How To Check For Mock Calls With Wildcards?

Django Test Filefield Using Test Fixtures

I'm trying to build tests for some models that have a FileField. The model looks like this: cla… Read more Django Test Filefield Using Test Fixtures

Python Raising _expectedfailure For Unittests With @unittest.expectedfailure

I have two systems running the same set of Django unittests. Some of the tests use the @unittest.ex… Read more Python Raising _expectedfailure For Unittests With @unittest.expectedfailure

Mocking A Socket Connection In Python

I am trying to write unit tests for a class in python. The class opens a tcp socket on init. I am t… Read more Mocking A Socket Connection In Python