style(endpoints/api/repoemail): ran yapf

### Description of Changes

Issue: https://coreosdev.atlassian.net/browse/QUAY-626

## Reviewer Checklist

- [ ] It works!
- [ ] Comments provide sufficient explanations for the next contributor
- [ ] Tests cover changes and corner cases
- [ ] Follows Quay syntax patterns and format
This commit is contained in:
Charlton Austin 2017-07-13 15:34:48 -04:00
parent d01b55f27d
commit bbe9b033d0
4 changed files with 31 additions and 17 deletions

View file

@ -45,9 +45,11 @@ def test_get_email_authorized_for_repo_return_repo(get_monkeypatch):
mock = Mock(confirmed=True, code='code')
get_monkeypatch.setattr(model.repository, 'get_email_authorized_for_repo', get_return_mock(mock))
actual = pre_oci_model.get_email_authorized_for_repo('namespace_name', 'repository_name', 'email')
actual = pre_oci_model.get_email_authorized_for_repo('namespace_name', 'repository_name',
'email')
assert actual == RepositoryAuthorizedEmail('email', 'repository_name', 'namespace_name', True, 'code')
assert actual == RepositoryAuthorizedEmail('email', 'repository_name', 'namespace_name', True,
'code')
def test_create_email_authorization_for_repo(get_monkeypatch):
@ -62,20 +64,26 @@ def test_create_email_authorization_for_repo(get_monkeypatch):
def test_create_email_authorization_for_repo_return_none(get_monkeypatch):
get_monkeypatch.setattr(model.repository, 'create_email_authorization_for_repo', return_none)
assert pre_oci_model.create_email_authorization_for_repo('namespace_name', 'repository_name', 'email') is None
assert pre_oci_model.create_email_authorization_for_repo('namespace_name', 'repository_name',
'email') is None
def test_create_email_authorization_for_repo_return_mock(get_monkeypatch):
mock = Mock()
get_monkeypatch.setattr(model.repository, 'create_email_authorization_for_repo', get_return_mock(mock))
get_monkeypatch.setattr(model.repository, 'create_email_authorization_for_repo',
get_return_mock(mock))
assert pre_oci_model.create_email_authorization_for_repo('namespace_name', 'repository_name', 'email') is not None
assert pre_oci_model.create_email_authorization_for_repo('namespace_name', 'repository_name',
'email') is not None
def test_create_email_authorization_for_repo_return_value(get_monkeypatch):
mock = Mock(confirmed=False, code='code')
get_monkeypatch.setattr(model.repository, 'create_email_authorization_for_repo', get_return_mock(mock))
get_monkeypatch.setattr(model.repository, 'create_email_authorization_for_repo',
get_return_mock(mock))
actual = pre_oci_model.create_email_authorization_for_repo('namespace_name', 'repository_name', 'email')
assert actual == RepositoryAuthorizedEmail('email', 'repository_name', 'namespace_name', False, 'code')
actual = pre_oci_model.create_email_authorization_for_repo('namespace_name', 'repository_name',
'email')
assert actual == RepositoryAuthorizedEmail('email', 'repository_name', 'namespace_name', False,
'code')