
from django.http import HttpRequest

class MockRequest(HttpRequest):
    """
    A mock request object which stores a user
    instance and the ip address.
    """
    def __init__(self, user=None, ip_address=None):
        from django.contrib.auth.models import AnonymousUser

        self.user = user or AnonymousUser()
        self.META = {
            'REMOTE_ADDR': ip_address,
        }

from django.http import HttpRequest

class MockRequest(HttpRequest):
    """
    A mock request object which stores a user
    instance and the ip address.
    """
    def __init__(self, user=None, ip_address=None):
        from django.contrib.auth.models import AnonymousUser

        self.user = user or AnonymousUser()
        self.GET = {}
        self.POST = {}
        self.COOKIES = {}
        self.META = {
            'REMOTE_ADDR': ip_address,
        }
Set POST/GET/COOKIES on MockRequest so repr works
Set POST/GET/COOKIES on MockRequest so repr works

  
  from django.http import HttpRequest
  
  class MockRequest(HttpRequest):
      """
      A mock request object which stores a user
      instance and the ip address.
      """
      def __init__(self, user=None, ip_address=None):
          from django.contrib.auth.models import AnonymousUser
  
          self.user = user or AnonymousUser()
+         self.GET = {}
+         self.POST = {}
+         self.COOKIES = {}
          self.META = {
              'REMOTE_ADDR': ip_address,
          }
Set POST/GET/COOKIES on MockRequest so repr works
## Code Before:

from django.http import HttpRequest

class MockRequest(HttpRequest):
    """
    A mock request object which stores a user
    instance and the ip address.
    """
    def __init__(self, user=None, ip_address=None):
        from django.contrib.auth.models import AnonymousUser

        self.user = user or AnonymousUser()
        self.META = {
            'REMOTE_ADDR': ip_address,
        }
## Instruction:
Set POST/GET/COOKIES on MockRequest so repr works
## Code After:

from django.http import HttpRequest

class MockRequest(HttpRequest):
    """
    A mock request object which stores a user
    instance and the ip address.
    """
    def __init__(self, user=None, ip_address=None):
        from django.contrib.auth.models import AnonymousUser

        self.user = user or AnonymousUser()
        self.GET = {}
        self.POST = {}
        self.COOKIES = {}
        self.META = {
            'REMOTE_ADDR': ip_address,
        }