Did I find the right examples for you? yes no

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)

src/s/p/sprinter-1.2.3/sprinter/formula/tests/test_package.py   sprinter(Download)
from __future__ import unicode_literals
import logging
from mock import Mock, patch
from sprinter.testtools import FormulaTest, set_os_types
import sprinter.lib as lib
    def test_simple_example_osx(self, call):
        """ A brew package should install on osx """
        with set_os_types(osx=True):
            self.environment.run_feature('simple_example', 'sync')
            call.assert_called_with("brew install git", output_log_level=logging.DEBUG, stdout=None)
 
    @patch.object(lib, 'call')
    def test_simple_example_debian(self, call):
        """ An apt-get package should install on debian """
        with set_os_types(debian=True):
    def test_simple_example_fedora(self, call):
        """ A yum package should install properly on fedora """
        with set_os_types(fedora=True):
            self.environment.run_feature('simple_example', 'sync')
            call.assert_called_with("sudo yum install git-core", output_log_level=logging.DEBUG, stdout=None)
    def test_update_different_package(self, call):
        """ An feature with a new formula """
        with set_os_types(debian=True):
            self.environment.run_feature('update_new_package', 'sync')
            call.assert_called_with("sudo apt-get -y install gitB", output_log_level=logging.DEBUG, stdout=None)

src/s/p/sprinter-1.2.3/sprinter/formula/tests/test_unpack.py   sprinter(Download)
from __future__ import unicode_literals
from mock import Mock, patch
from sprinter.testtools import FormulaTest, set_os_types
import sprinter.lib as lib
 
    def test_dmg_with_target(self, extract_dmg):
        """ Test the dmg extracting to a specific target """
        with set_os_types(osx=True):
            self.environment.run_feature("dmg_with_target", 'sync')
            extract_dmg.assert_called_with(TEST_DMG, '/testpath', remove_common_prefix=False)