예제 #1
0
 def test_get_owned_nodes_with_nodes_owned_by_system_users(self):
     factory.make_node(owner=get_legacy_user()),
     self.assertEqual([], list(get_owned_nodes()))
예제 #2
0
 def test_get_owned_nodes_no_owned_nodes(self):
     factory.make_node()
     self.assertEqual([], list(get_owned_nodes()))
예제 #3
0
 def test_get_owned_nodes_with_owned_nodes(self):
     nodes = {
         factory.make_node(owner=factory.make_user()),
         factory.make_node(owner=factory.make_user()),
         }
     self.assertSetEqual(nodes, set(get_owned_nodes()))
예제 #4
0
 def test_get_owned_nodes_no_nodes(self):
     self.assertEqual([], list(get_owned_nodes()))