Skip to content

Commit

Permalink
[#1117] Use factories instead of data in navl/test_validators.py
Browse files Browse the repository at this point in the history
So data.py is now unused and we can remove it.
  • Loading branch information
Sean Hammond committed Jul 30, 2013
1 parent a5fe9e6 commit fe8eec0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 37 deletions.
32 changes: 0 additions & 32 deletions ckan/new_tests/data.py

This file was deleted.

10 changes: 5 additions & 5 deletions ckan/new_tests/lib/navl/test_validators.py
Expand Up @@ -6,7 +6,7 @@

import nose.tools

import ckan.new_tests.data as test_data
import ckan.new_tests.factories as factories


class TestValidators(object):
Expand All @@ -28,12 +28,12 @@ def test_ignore_missing_with_value_missing(self):
key = ('key to be validated',)

# The data to pass to the validator function for validation.
data = test_data.validator_data_dict()
data = factories.validator_data_dict()
if value != 'skip':
data[key] = value

# The errors dict to pass to the validator function.
errors = test_data.validator_errors_dict()
errors = factories.validator_errors_dict()
errors[key] = []

# Make copies of the data and errors dicts for asserting later.
Expand Down Expand Up @@ -66,9 +66,9 @@ def test_ignore_missing_with_a_value(self):
import ckan.lib.navl.validators as validators

key = ('key to be validated',)
data = test_data.validator_data_dict()
data = factories.validator_data_dict()
data[key] = 'value to be validated'
errors = test_data.validator_errors_dict()
errors = factories.validator_errors_dict()
errors[key] = []

# Make copies of the data and errors dicts for asserting later.
Expand Down

0 comments on commit fe8eec0

Please sign in to comment.