rackerlabs/deuce — pull request #136 by BenjamenMeyer (2014-09-09 20:42:47+00:00)
Title: Design abstract tests  **Proposal, DO NOT MERGE*

Proposing we change up the tests a little for the drivers by using an abstract base class to hold the tests that all drivers must pass. At the moment this PR implements this for the Metadata Drivers.

I'd prefer to use an Abstract Base Class drived from TestCases, however, at least at present there seems to be no desire by the Python maintainers (http://bugs.python.org/issue17519) to make that possible, where they prefer the work-around solution as done here. I'd prefer the more direct approach as it has less inheritance. But such is life.

If we like this, then I'll move the MetaDataDriverTest class to its own file so that the Sqlite Driver Test file looks like the Cassandra and MongoDB tests, and then do the same for the Block Storage drivers. The benefit is that we can more directly force the base tests to not rely on any specific driver implementation, so a test doesn't get too closely tied to Sqlite or Disk storage drivers. The individual tests can, if necessary, add specific drivers tests (like the Swift test already does).

Opening up to discussion - @painterjd @raxyu @TheSriram