Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def sign_up_teams_to_events(session):
"""Sign up user to the events in the database.
Parameters
----------
session : :class:`sqlalchemy.orm.Session`
The session to directly perform the operation on the database.
Notes
-----
Be aware that :func:`add_users`, :func:`add_problems`,
and :func:`add_events` need to be called before.
"""
for event_name in ['iris_test', 'boston_housing_test']:
sign_up_team(session, event_name, 'test_user')
sign_up_team(session, event_name, 'test_user_2')
def sign_up_teams_to_events(session):
"""Sign up user to the events in the database.
Parameters
----------
session : :class:`sqlalchemy.orm.Session`
The session to directly perform the operation on the database.
Notes
-----
Be aware that :func:`add_users`, :func:`add_problems`,
and :func:`add_events` need to be called before.
"""
for event_name in ['iris_test', 'boston_housing_test']:
sign_up_team(session, event_name, 'test_user')
sign_up_team(session, event_name, 'test_user_2')
def sign_up_team(config, event, team):
"""Sign-up a user (or team) for a RAMP event."""
config = read_config(config)
with session_scope(config['sqlalchemy']) as session:
team_module.sign_up_team(session, event, team)