# Path: app/modules/teams/models.py
# class TeamMember(db.Model):
# class Team(db.Model, Timestamp):
#     def __repr__(self):
#     def check_owner(self, user):
#     def check_supervisor(self, user):
#     def __repr__(self):
#     def validate_title(self, key, title):  # pylint: disable=unused-argument,no-self-use
#     def check_owner(self, user):


import json
from app.modules.teams import models
            content_type='application/json',
            data=json.dumps([
                {
                    'op': 'replace',
                    'path': '/title',
                    'value': team_title
                },
            ])
        )

    assert response.status_code == 200
    assert response.content_type == 'application/json'
    assert set(response.json.keys()) >= {'id', 'title'}
    assert response.json['id'] == team_for_regular_user.id
    assert response.json['title'] == team_title
    assert team_for_regular_user.title == team_title


def test_update_team_info_with_invalid_data_must_fail(
        flask_app_client,
        regular_user,
        team_for_regular_user
):
    # pylint: disable=invalid-name
    with flask_app_client.login(regular_user, auth_scopes=('teams:write', )):
        response = flask_app_client.patch(
            '/api/v1/teams/%d' % team_for_regular_user.id,
            content_type='application/json',
            data=json.dumps([
                {

# Path: app/modules/teams/models.py
# class TeamMember(db.Model):
# class Team(db.Model, Timestamp):
#     def __repr__(self):
#     def check_owner(self, user):
#     def check_supervisor(self, user):
#     def __repr__(self):
#     def validate_title(self, key, title):  # pylint: disable=unused-argument,no-self-use
#     def check_owner(self, user):


# Path: tests/modules/teams/resources/test_modifying_teams.py
import json
from app.modules.teams import models

            content_type='application/json',
            data=json.dumps([
                {
                    'op': 'replace',
                    'path': '/title',
                    'value': team_title
                },
            ])
        )

    assert response.status_code == 200
    assert response.content_type == 'application/json'
    assert set(response.json.keys()) >= {'id', 'title'}
    assert response.json['id'] == team_for_regular_user.id
    assert response.json['title'] == team_title
    assert team_for_regular_user.title == team_title


def test_update_team_info_with_invalid_data_must_fail(
        flask_app_client,
        regular_user,
        team_for_regular_user
):
    # pylint: disable=invalid-name
    with flask_app_client.login(regular_user, auth_scopes=('teams:write', )):
        response = flask_app_client.patch(
            '/api/v1/teams/%d' % team_for_regular_user.id,
            content_type='application/json',
            data=json.dumps([
                {

                    'op': 'replace',