Beispiel #1
0
    def test_items(self, mock_find_active_allocations):
        request0 = AllocationRequest(project_name="Project X", status="E")
        request1 = AllocationRequest(project_name="Project Y", status="X")
        expected_items = [request0, request1]

        mock_find_active_allocations.return_value = expected_items
        site_map = AllocationsSitemap()
        actual_items = site_map.items()
        self.assertListEqual(expected_items, actual_items)
Beispiel #2
0
    def test_items(self, mock_find_active_allocations):
        request0 = AllocationRequest(project_name="Project X", status="E")
        request1 = AllocationRequest(project_name="Project Y", status="X")
        expected_items = [request0, request1]

        mock_find_active_allocations.return_value = expected_items
        site_map = AllocationsSitemap()
        actual_items = site_map.items()
        self.assertListEqual(expected_items, actual_items)