from gogoutils.parser import Parser


def test_parser_url():
    """Test parsing of url"""

    urls = [
        'http://github.com/gogoair/test',
        'https://github.com/gogoair/test',
        'http://github.com/gogoair/test.git',
        'https://github.com/gogoair/test.git',
        'https://username@testgithub.com/gogoair/test.git',
        'git@github.com:gogoair/test.git',
    ]

    for url in urls:
        project, repo = Parser(url).parse_url()
        assert project == 'gogoair'
        assert repo == 'test'

from gogoutils.parser import Parser


def test_parser_url():
    """Test parsing of url"""

    urls = [
        'http://github.com/gogoair/test',
        'https://github.com/gogoair/test',
        'http://github.com/gogoair/test.git',
        'https://github.com/gogoair/test.git',
        'https://username@testgithub.com/gogoair/test.git',
        'git@github.com:gogoair/test.git',
        'git://git@github.com/gogoair/test.git',
        'file:///opt/git/gogoair/test.git',
        'ssh://git@github.com/gogoair/test.git',
    ]

    for url in urls:
        project, repo = Parser(url).parse_url()
        assert project == 'gogoair'
        assert repo == 'test'

Add additional git url formats
Add additional git url formats

  from gogoutils.parser import Parser
  
  
  def test_parser_url():
      """Test parsing of url"""
  
      urls = [
          'http://github.com/gogoair/test',
          'https://github.com/gogoair/test',
          'http://github.com/gogoair/test.git',
          'https://github.com/gogoair/test.git',
          'https://username@testgithub.com/gogoair/test.git',
          'git@github.com:gogoair/test.git',
+         'git://git@github.com/gogoair/test.git',
+         'file:///opt/git/gogoair/test.git',
+         'ssh://git@github.com/gogoair/test.git',
      ]
  
      for url in urls:
          project, repo = Parser(url).parse_url()
          assert project == 'gogoair'
          assert repo == 'test'
  
Add additional git url formats
## Code Before:
from gogoutils.parser import Parser


def test_parser_url():
    """Test parsing of url"""

    urls = [
        'http://github.com/gogoair/test',
        'https://github.com/gogoair/test',
        'http://github.com/gogoair/test.git',
        'https://github.com/gogoair/test.git',
        'https://username@testgithub.com/gogoair/test.git',
        'git@github.com:gogoair/test.git',
    ]

    for url in urls:
        project, repo = Parser(url).parse_url()
        assert project == 'gogoair'
        assert repo == 'test'

## Instruction:
Add additional git url formats
## Code After:
from gogoutils.parser import Parser


def test_parser_url():
    """Test parsing of url"""

    urls = [
        'http://github.com/gogoair/test',
        'https://github.com/gogoair/test',
        'http://github.com/gogoair/test.git',
        'https://github.com/gogoair/test.git',
        'https://username@testgithub.com/gogoair/test.git',
        'git@github.com:gogoair/test.git',
        'git://git@github.com/gogoair/test.git',
        'file:///opt/git/gogoair/test.git',
        'ssh://git@github.com/gogoair/test.git',
    ]

    for url in urls:
        project, repo = Parser(url).parse_url()
        assert project == 'gogoair'
        assert repo == 'test'
