Example #1
0
 def test_unify_registered_external_namespaces(self, discover_external_namespaces, islink, symlink):
     discover_external_namespaces.return_value = [('pid', 'inode')]
     islink.return_value = True
     unify_external_namespaces()
     symlink.assert_not_called()
Example #2
0
 def test_unify_non_registered_external_namespaces(self, discover_external_namespaces, islink, symlink):
     discover_external_namespaces.return_value = [('pid', 'inode')]
     islink.return_value = False
     unify_external_namespaces()
     symlink.assert_called_once_with('/proc/pid/ns/net', '/var/run/netns/inode')