DOAJ/doaj — pull request #332 by emanuil-tolev (2014-09-25 15:36:16+00:00)
Title: refactor unit tests to have common setup and use isolated index

1. renamed test dir and made it a package (rename is so we don't do ```import test``` which is extremely ambiguous)

2. made sure each test imports the package, thus running its __init__.py, which in turn imports/runs a bootstrap module. This file overrides the elasticsearch index setting, causing all test runs to use "doajtest" as their index instead of "doaj".

3. defined a helpers module. For now it only contains a common superclass for all test cases (groups of tests) that DOAJ uses for unit testing. This is currently being used to share setUp and tearDown code - namely, to create the index before each test and destroy it after each test, ensuring 100% isolation.

All tests under the doajtest/unit directory succeed. I run ```nosetests``` in there.