Example #1
0
 def test_vagrant_base_boxes(self):
     with patch('fabtools.vagrant._box_list') as mock_list:
         mock_list.return_value = [
             ('lucid32', 'virtualbox'),
             ('precise64', 'virtualbox'),
             ('precise64', 'vmware_fusion'),
         ]
         from fabtools.vagrant import base_boxes
         self.assertEqual(base_boxes(), ['lucid32', 'precise64'])
 def test_vagrant_base_boxes(self):
     with patch('fabtools.vagrant._box_list') as mock_list:
         mock_list.return_value = [
             ('lucid32', 'virtualbox'),
             ('precise64', 'virtualbox'),
             ('precise64', 'vmware_fusion'),
         ]
         from fabtools.vagrant import base_boxes
         self.assertEqual(base_boxes(), ['lucid32', 'precise64'])
Example #3
0
def test_boxes():
    """
    Get the list of vagrant base boxes to use

    The default is to get the list of all base boxes.

    This can be overridden with the FABTOOLS_TEST_BOXES environment variable.
    """
    boxes = os.environ.get('FABTOOLS_TEST_BOXES')
    if boxes is not None:
        return boxes.split()
    else:
        return base_boxes()
def test_boxes():
    """
    Get the list of vagrant base boxes to use

    The default is to get the list of all base boxes.

    This can be overridden with the FABTOOLS_TEST_BOXES environment variable.
    """
    boxes = os.environ.get('FABTOOLS_TEST_BOXES')
    if boxes is not None:
        return boxes.split()
    else:
        return base_boxes()