Fix tests given recent celery "case" change

This commit is contained in:
Christopher Allan Webber 2012-02-28 13:31:03 -06:00
parent 4f9f969dec
commit e9f87f728c
7 changed files with 16 additions and 16 deletions

View File

@ -11,4 +11,4 @@ encouragement_phrase = 586956856856 # shouldn't throw error
blah_blah = "blah!" # shouldn't throw error either blah_blah = "blah!" # shouldn't throw error either
[celery] [celery]
eat_celery_with_carrots = pants # yeah that's def an error right there. EAT_CELERY_WITH_CARROTS = pants # yeah that's def an error right there.

View File

@ -10,4 +10,4 @@ encouragement_phrase = "I'd love it if you eat your carrots!"
blah_blah = "blah!" blah_blah = "blah!"
[celery] [celery]
eat_celery_with_carrots = False EAT_CELERY_WITH_CARROTS = False

View File

@ -1,9 +1,9 @@
['mediagoblin'] [mediagoblin]
# I got nothin' in this file! # I got nothin' in this file!
['celery'] [celery]
some_variable = floop SOME_VARIABLE = floop
mail_port = 2000 MAIL_PORT = 2000
celeryd_eta_scheduler_precision = 1.3 CELERYD_ETA_SCHEDULER_PRECISION = 1.3
celery_result_persistent = true CELERY_RESULT_PERSISTENT = true
celery_imports = foo.bar.baz, this.is.an.import CELERY_IMPORTS = foo.bar.baz, this.is.an.import

View File

@ -7,4 +7,4 @@ num_carrots = integer(default=1)
encouragement_phrase = string() encouragement_phrase = string()
[celery] [celery]
eat_celery_with_carrots = boolean(default=True) EAT_CELERY_WITH_CARROTS = boolean(default=True)

View File

@ -37,7 +37,7 @@ def test_read_mediagoblin_config():
assert this_conf['carrotapp']['carrotcake'] == False assert this_conf['carrotapp']['carrotcake'] == False
assert this_conf['carrotapp']['num_carrots'] == 1 assert this_conf['carrotapp']['num_carrots'] == 1
assert not this_conf['carrotapp'].has_key('encouragement_phrase') assert not this_conf['carrotapp'].has_key('encouragement_phrase')
assert this_conf['celery']['eat_celery_with_carrots'] == True assert this_conf['celery']['EAT_CELERY_WITH_CARROTS'] == True
# A good file # A good file
this_conf, validation_results = config.read_mediagoblin_config( this_conf, validation_results = config.read_mediagoblin_config(
@ -48,7 +48,7 @@ def test_read_mediagoblin_config():
assert this_conf['carrotapp']['encouragement_phrase'] == \ assert this_conf['carrotapp']['encouragement_phrase'] == \
"I'd love it if you eat your carrots!" "I'd love it if you eat your carrots!"
assert this_conf['carrotapp']['blah_blah'] == "blah!" assert this_conf['carrotapp']['blah_blah'] == "blah!"
assert this_conf['celery']['eat_celery_with_carrots'] == False assert this_conf['celery']['EAT_CELERY_WITH_CARROTS'] == False
# A bad file # A bad file
this_conf, validation_results = config.read_mediagoblin_config( this_conf, validation_results = config.read_mediagoblin_config(
@ -61,7 +61,7 @@ def test_read_mediagoblin_config():
assert this_conf['carrotapp']['encouragement_phrase'] == \ assert this_conf['carrotapp']['encouragement_phrase'] == \
"586956856856" "586956856856"
assert this_conf['carrotapp']['blah_blah'] == "blah!" assert this_conf['carrotapp']['blah_blah'] == "blah!"
assert this_conf['celery']['eat_celery_with_carrots'] == "pants" assert this_conf['celery']['EAT_CELERY_WITH_CARROTS'] == "pants"
def test_generate_validation_report(): def test_generate_validation_report():
@ -89,7 +89,7 @@ There were validation problems loading this config file:
expected_warnings = [ expected_warnings = [
'carrotapp:carrotcake = the value "slobber" is of the wrong type.', 'carrotapp:carrotcake = the value "slobber" is of the wrong type.',
'carrotapp:num_carrots = the value "GROSS" is of the wrong type.', 'carrotapp:num_carrots = the value "GROSS" is of the wrong type.',
'celery:eat_celery_with_carrots = the value "pants" is of the wrong type.'] 'celery:EAT_CELERY_WITH_CARROTS = the value "pants" is of the wrong type.']
warnings = report.splitlines()[2:] warnings = report.splitlines()[2:]
assert len(warnings) == 3 assert len(warnings) == 3

View File

@ -26,4 +26,4 @@ data_dir = %(here)s/test_user_dev/beaker/cache/data
lock_dir = %(here)s/test_user_dev/beaker/cache/lock lock_dir = %(here)s/test_user_dev/beaker/cache/lock
[celery] [celery]
celery_always_eager = true CELERY_ALWAYS_EAGER = true

View File

@ -29,7 +29,7 @@ beaker.session.data_dir = %(here)s/test_user_dev/beaker/sessions/data
beaker.session.lock_dir = %(here)s/test_user_dev/beaker/sessions/lock beaker.session.lock_dir = %(here)s/test_user_dev/beaker/sessions/lock
[celery] [celery]
celery_always_eager = true CELERY_ALWAYS_EAGER = true
[server:main] [server:main]
use = egg:Paste#http use = egg:Paste#http