Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
from app import main

if __name__ == '__main__':
    main.start()
Beispiel #4
0
from app.main import start

if __name__ == '__main__':
    start()