Content - ContentTypes ContentTypeResource and ContentUnitsCollections

I thought these three would share more code than they ended up sharing so I combined them. The next one looks more complex though, so decided to make this PR now.
On 12/17/2014 04:21 PM, bmbouter wrote:
> I agree Django's test runner would be good to move to because it would
> be less for us to maintain. I think that for now we're going to move
> these statements to run-test.py so that the settings.py module can be
> found in all tests. It will also deduplicate the os.environ call so that
> it's all in one place. My thinking is that we can focus on the port now
> and focus on improving the test runner as a separate issue. What do you
> think?

I can think of one downside to that particular plan. Right now, you can
run a lot of our tests using nosetests directly by hand. Of course, many
of them fail when run by themselves because our tests have isolation
problems, but actually most of them can be run independently. I think
this is valuable for quickly running isolated tests, so I'd prefer to
keep this ability, and I'd prefer not to have to set env variables
(though I certainly can do this in my virtualenv if we do go this route).

I do have a counterproposal though! Since Django is only used in
pulp.server, and since there is a base test module in pulp.server, we
could put this statement in that base module for now. Can you think of
any downsides to this? One I can think of is that not everything imports
base as it is, and flake8 will get very angry about unused imports. On
the plus, we can keep the switch to Django's test runner as a separate
concern as you prefer, but we can also avoid adding this statement to
all of our tests at the same time while maintaining the ability to use
nosetests.

If we do decide to put this in run-tests, I can easily have my pulp
virtualenv add this env variable for when I want to use Nose directly,
so it's not that big of a deal to me.