Improve tests for AbstractDataSource subclasses

These are fairly basic objects with almost no tests, and tests should be straightforward.
Please move this function `myfunc` to `setUp` since it is used all over the place. We should also be able to move the `data_source` variable.