Merge pull request #210 from dreamhost/bugs/fix-TestIpNetnsCommand

Fix test_execute_env_var_prepend
This commit is contained in:
Ryan Petrello 2015-01-28 10:47:43 -05:00
commit c32c698a27
1 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import collections
import unittest
import mock
@ -675,7 +676,7 @@ class TestIpNetnsCommand(TestIPCmdBase):
def test_execute_env_var_prepend(self):
self.parent.namespace = 'ns'
with mock.patch('akanda.rug.common.linux.utils.execute') as execute:
env = dict(FOO=1, BAR=2)
env = collections.OrderedDict(FOO=1, BAR=2)
self.netns_cmd.execute(['ip', 'link', 'list'], env)
execute.assert_called_once_with(
['FOO=1', 'BAR=2', 'ip', 'netns', 'exec', 'ns', 'ip', 'link',