File: test_make_author_email.py

package info (click to toggle)
python-briefcase 0.3.22-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,300 kB
  • sloc: python: 59,405; makefile: 57
file content (17 lines) | stat: -rw-r--r-- 616 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import pytest


@pytest.mark.parametrize(
    "name, bundle, candidate",
    [
        ("Jane Developer", "com.example", "jane@example.com"),
        ("Jane Developer", "com.example.more", "jane@more.example.com"),
        ("Jane", "com.example", "jane@example.com"),
    ],
)
def test_make_author_email(new_command, name, bundle, candidate):
    """An author name and bundle can be converted into a valid email address."""
    email = new_command.make_author_email(name, bundle)
    assert email == candidate
    # Double check - the app name passes the validity check.
    assert new_command.validate_email(email)