ckan/ckan — pull request #1672 by amercader (2014-10-22 14:35:45+00:00)
Title: Tests should be grouped by class

Our testing coding standards tells us to group related tests by using the same
prefix. For example, every test for `package_create` would begin with
`test_package_create_*`. Instead of doing that, I'm proposing to group the
tests by class. For example, right now, the tests will look like:

```python
class TestCreate(object):
# ...

def test_package_create_validates_name(self):
# ...

def test_package_create_validates_url(self):
# ...

def test_resource_create_validates_package_id(self):
# ...

# ...
```

With this new proposal, this would change to:

```python
class TestPackageCreate(object):
# ...
def test_package_create_validates_name(self):
# ...

def test_package_create_validates_url(self):
# ...

class TestResourceCreate(object)
# ...
def test_resource_create_validates_package_id(self):
# ...

# ...
```

This makes it possible to run just the tests for a single action method, and
IMO makes the tests more organized, specially on the logic layer's tests.