Commit a7cae3ff by Fábián János

Add function all() to test QuerySet, model was changed to Node

parent c8df8f6e
...@@ -28,6 +28,7 @@ from django.http import HttpRequest, Http404, QueryDict ...@@ -28,6 +28,7 @@ from django.http import HttpRequest, Http404, QueryDict
from django.utils import baseconv from django.utils import baseconv
from ..models import Profile from ..models import Profile
from vm.models import Node
from ..views import InstanceActivityDetail, InstanceActivity from ..views import InstanceActivityDetail, InstanceActivity
from ..views import vm_ops, vm_mass_ops, Instance, UnsubscribeFormView from ..views import vm_ops, vm_mass_ops, Instance, UnsubscribeFormView
from ..views import AclUpdateView from ..views import AclUpdateView
...@@ -35,11 +36,15 @@ from .. import views ...@@ -35,11 +36,15 @@ from .. import views
class QuerySet(list): class QuerySet(list):
model = MagicMock() model = Node
def get(self, *args, **kwargs): def get(self, *args, **kwargs):
return self.pop() return self.pop()
def all(self):
return self
class ViewUserTestCase(unittest.TestCase): class ViewUserTestCase(unittest.TestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment