import unittest


def test_one(test_file):
    """
    Runs the unittest without generating a coverage report.

    Enter 'docker-compose run --rm flask python manage.py test_one <NAME_OF_FILE>' to run only
    one test file in the 'tests' directory. It provides no coverage report.

    Example: 'docker-compose run --rm flask python manage.py test_one test_website'
    Note that you do not need to put the extension of the test file.

    :return int: 0 if all tests pass, 1 if not
    """

    tests = unittest.TestLoader().discover('tests', pattern=test_file + '.py')
    result = unittest.TextTestRunner(verbosity=2).run(tests)
    if result.wasSuccessful():
        return 0
    else:
        return 1