Ejemplo n.º 1
0
def test_create_domain_by_prompt():
    """Tests WebsiteDomain factory function using prompt."""
    domain = WebsiteDomain('example.com')
    assert domain == create_domain('example.com')

    with patch(_INPUT, return_value='example.com'):
        assert domain == create_domain()
Ejemplo n.º 2
0
def test_create_domain():
    """Tests WebsiteDomain factory function."""
    domain = WebsiteDomain('example.com')
    assert domain == create_domain('example.com')