コード例 #1
0
ファイル: tests.py プロジェクト: umitproject/network-admin
    def test_shared_objects(self):
        """
        The shared_objects() method should return list of objects
        owned or shared by the user
        """
        self.assertIn(self.host, Host.shared_objects(self.owner))
        self.assertNotIn(self.host, Host.shared_objects(self.friend))

        self.host.share(self.friend)
        self.assertIn(self.host, Host.shared_objects(self.friend))