/usr/lib/python2.7/dist-packages/chef/tests/test_environment.py is in python-chef 0.2.3-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | from chef import Environment
from chef.exceptions import ChefAPIVersionError
from chef.tests import ChefTestCase, test_chef_api
class EnvironmentTestCase(ChefTestCase):
def test_version_error_list(self):
with test_chef_api(version='0.9.0'):
with self.assertRaises(ChefAPIVersionError):
Environment.list()
def test_version_error_create(self):
with test_chef_api(version='0.9.0'):
with self.assertRaises(ChefAPIVersionError):
Environment.create(self.random())
def test_version_error_init(self):
with test_chef_api(version='0.9.0'):
with self.assertRaises(ChefAPIVersionError):
Environment(self.random())
|