<s> import os <EOL> import sys <EOL> import unittest <EOL> from kuyruk . config import Config <EOL> from . import config as user_config <EOL> sys . path . append ( os . path . abspath ( os . path . dirname ( __file__ ) ) ) <EOL> class ConfigTestCase ( unittest . TestCase ) : <EOL> def test_from_pymodule ( self ) : <EOL> config = Config ( ) <EOL> config . from_pymodule ( '<STR_LIT>' ) <EOL> self . assertEqual ( config . WORKER_MAX_LOAD , <NUM_LIT:20> ) <EOL> def test_from_pyfile ( self ) : <EOL> dirname = os . path . dirname ( __file__ ) <EOL> path = os . path . join ( dirname , '<STR_LIT>' ) <EOL> config = Config ( ) <EOL> config . from_pyfile ( path ) <EOL> self . assertEqual ( config . WORKER_MAX_LOAD , <NUM_LIT:20> ) <EOL> def test_from_object ( self ) : <EOL> user_config . WORKER_MAX_LOAD = <NUM_LIT> <EOL> config = Config ( ) <EOL> config . from_object ( user_config ) <EOL> self . assertEqual ( config . WORKER_MAX_LOAD , <NUM_LIT> ) </s>
