def test_optional_start_responses(self): """ Test optional responses to '/start' POST """ paramData = {'width': 20, 'height': 20, 'game_id': 'game1'} headers = {'Content-Type': 'application/json'} with boddle(json=paramData, headers=headers): response = main.start() self.assertIn('head_type', response) self.assertIn('tail_type', response)
def test_start_response(self): """ Test required responses to `/start` POST """ paramData = {'game_id': 'game1', 'width': 20, 'height': 20} headers = {'Content-Type': 'application/json'} with boddle(json=paramData, headers=headers): response = main.start() self.assertIn('color', response) self.assertIn('head_url', response) self.assertIn('name', response) self.assertIn('taunt', response)
from app import main if __name__ == '__main__': main.start()
from app.main import start if __name__ == '__main__': start()