# Path: sprinter/testtools.py
# class FormulaTest(object):
# 
#     def setup(self, **kw):
#         self.environment, self.temp_directory = create_mock_environment(**kw)
#         # adding some extra mocking
#         self.directory = self.environment.directory
#         self.environment.instantiate_features()
# 
#     def tearDown(self):
#         shutil.rmtree(self.temp_directory)
# 
# Path: sprinter/formula/git.py
# CURRENT_REMOTE = "git -C {dir} config --get remote.origin.url"
# 
# CURRENT_BRANCH = "git -C {dir} rev-parse --abbrev-ref HEAD"
# 
# CLONE_REPO = "git clone {repo} {dir}"
# 
# CHECKOUT_BRANCH = "git -C {dir} checkout {branch}"
# 
# FETCH_BRANCH = "git -C {dir} fetch origin {branch}"
# 
# MERGE_BRANCH = "git -C {dir} merge --ff-only origin/{branch}"
# 
# UPDATE_ORIGIN = "git -C {dir} remote set-url origin {repo}"


import logging
import os
import os.path
import sprinter.lib as lib
from mock import patch, call
from sprinter.testtools import FormulaTest
from sprinter.formula.git import CURRENT_REMOTE, CURRENT_BRANCH, CLONE_REPO, CHECKOUT_BRANCH, FETCH_BRANCH, MERGE_BRANCH, UPDATE_ORIGIN
from __future__ import unicode_literals

vals = {
    'repoA': 'git://github.com/toumorokoshi/sprinter.git'
}

source_config = """
[update]
formula = sprinter.formula.git
url = %(repoA)s
""" % vals

target_config = """
[simple_example]
formula = sprinter.formula.git
url = %(repoA)s

[update]

# Path: sprinter/testtools.py
# class FormulaTest(object):
# 
#     def setup(self, **kw):
#         self.environment, self.temp_directory = create_mock_environment(**kw)
#         # adding some extra mocking
#         self.directory = self.environment.directory
#         self.environment.instantiate_features()
# 
#     def tearDown(self):
#         shutil.rmtree(self.temp_directory)
# 
# Path: sprinter/formula/git.py
# CURRENT_REMOTE = "git -C {dir} config --get remote.origin.url"
# 
# CURRENT_BRANCH = "git -C {dir} rev-parse --abbrev-ref HEAD"
# 
# CLONE_REPO = "git clone {repo} {dir}"
# 
# CHECKOUT_BRANCH = "git -C {dir} checkout {branch}"
# 
# FETCH_BRANCH = "git -C {dir} fetch origin {branch}"
# 
# MERGE_BRANCH = "git -C {dir} merge --ff-only origin/{branch}"
# 
# UPDATE_ORIGIN = "git -C {dir} remote set-url origin {repo}"


# Path: sprinter/formula/tests/test_git.py
import logging
import os
import os.path
import sprinter.lib as lib
from mock import patch, call
from sprinter.testtools import FormulaTest
from sprinter.formula.git import CURRENT_REMOTE, CURRENT_BRANCH, CLONE_REPO, CHECKOUT_BRANCH, FETCH_BRANCH, MERGE_BRANCH, UPDATE_ORIGIN

from __future__ import unicode_literals

vals = {
    'repoA': 'git://github.com/toumorokoshi/sprinter.git'
}

source_config = """
[update]
formula = sprinter.formula.git
url = %(repoA)s
""" % vals

target_config = """
[simple_example]
formula = sprinter.formula.git
url = %(repoA)s

[update]

formula = sprinter.formula.git