Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: implemented new integrative expirement tests #322

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

lbarbMITRE
Copy link
Contributor

Closes #310

@jkglasbrenner
Copy link
Collaborator

In preparation for review, I merged #324 into dev, squashed this branch's commits, and rebased it on dev.

Continue migration towards a behavior-driven style of testing for the REST endpoints and away from
heavy mocking.

Closes #310
Copy link
Collaborator

@jkglasbrenner jkglasbrenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I did some minor cleanup by running black over test_experiment.py and doing some minor editing of the docstrings. The editing was mostly structural, I wanted the scenarios to be formatted as block literals. In restructured text, that can be done by ending a sentence with :: and indenting the next block of text, see below for an example.

def test_register_experiment(client: FlaskClient, db: SQLAlchemy) -> None:
    """Tests that experiments can be registered following the scenario below::

        Scenario: Registering an Experiment
            Given I am an authorized user,
            I need to be able to submit a register request,
            in order to register an experiment.

    This test validates by following these actions:

    - A user registers two experiments, "mnist_name" and "mnist_id".
    - The user is able to retrieve information about each experiment using the
      experiment id or the unique experiment name.
    - In both cases, the returned information matches the information that was provided
      during registration.
    """

@jkglasbrenner jkglasbrenner merged commit e67864e into dev Nov 30, 2023
21 checks passed
@jkglasbrenner jkglasbrenner deleted the lbarber-experiment-tests branch November 30, 2023 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants