Ejemplo n.º 1
0
    def test_get_rake_path(self):
        module = FakeAnsibleModule()
        module.get_bin_path = Mock()

        rake = RakeModule(module)
        rake.get_rake_path()

        module.get_bin_path.assert_called_with('rake', True, [])
Ejemplo n.º 2
0
    def test_run_command_with_unchanged_diff_paths(self):
        module = FakeAnsibleModule()
        module.get_bin_path = Mock()
        module.params['path'] = '.'
        module.params['diff_paths'] = [{
            'current': 'test/fixtures/current_db',
            'next': 'text/fixtures/next_db'
        }]
        module.run_command = Mock(return_value=(True, '', ''))

        rake = RakeModule(module)
        rake.run_command('db:migrate')
        module.run_command.assert_not_called()