<s> import pytest <EOL> from calvin . requests . calvinresponse import RESPONSE_CODES , CalvinResponse <EOL> pytestmark = pytest . mark . unittest <EOL> def test_boolean_value ( ) : <EOL> success_list = range ( <NUM_LIT:200> , <NUM_LIT> ) <EOL> for code in RESPONSE_CODES : <EOL> response = CalvinResponse ( code ) <EOL> if code in success_list : <EOL> assert response <EOL> else : <EOL> assert not response <EOL> def test_comparisons ( ) : <EOL> first = CalvinResponse ( <NUM_LIT:100> ) <EOL> second = CalvinResponse ( <NUM_LIT:200> ) <EOL> third = CalvinResponse ( <NUM_LIT:200> ) <EOL> assert first < second <EOL> assert second > first <EOL> assert second == third <EOL> assert first != second <EOL> assert second <= third <EOL> assert third <= second <EOL> def test_set_status ( ) : <EOL> response = CalvinResponse ( <NUM_LIT:100> ) <EOL> assert response . status == <NUM_LIT:100> <EOL> response . set_status ( <NUM_LIT> ) <EOL> assert response . status == <NUM_LIT> <EOL> response . set_status ( True ) <EOL> assert response . status == <NUM_LIT:200> <EOL> response . set_status ( False ) <EOL> assert response . status == <NUM_LIT> </s>
