<s> from __future__ import unicode_literals , absolute_import , division <EOL> from flask import Flask <EOL> import pytest <EOL> from alchemist . conf import settings <EOL> class TestSettings : <EOL> def test_no_context ( self ) : <EOL> with pytest . raises ( KeyError ) : <EOL> settings [ '<STR_LIT>' ] <EOL> assert settings . get ( '<STR_LIT>' ) is None <EOL> assert '<STR_LIT>' not in settings <EOL> assert len ( settings ) == <NUM_LIT:0> <EOL> assert len ( list ( iter ( settings ) ) ) == <NUM_LIT:0> <EOL> def test_with_context ( self ) : <EOL> app = Flask ( '<STR_LIT>' ) <EOL> app . config [ '<STR_LIT>' ] = <NUM_LIT:1> <EOL> with app . app_context ( ) : <EOL> assert '<STR_LIT>' in settings <EOL> assert settings [ '<STR_LIT>' ] == <NUM_LIT:1> <EOL> assert len ( settings ) > <NUM_LIT:0> <EOL> assert len ( list ( iter ( settings ) ) ) > <NUM_LIT:0> </s>
