Example #1
0
    def test_echo_datetime(self):
        dt = datetime.now(pytz.utc).isoformat()
        params = urlencode({"dt": dt})

        print(params)
        url = "http://localhost:9751/echo_datetime?%s" % str(params)
        data = urlopen(url).read()

        assert dt == data
Example #2
0
    def test_echo_datetime(self):
        dt = datetime.now(pytz.utc).isoformat().encode('ascii')
        params = urlencode({
            'dt': dt,
        })

        print(params)
        url = '%s/echo_datetime?%s' % (self.base_url, str(params))
        data = urlopen(url).read()

        assert dt == data
Example #3
0
    def test_echo_datetime(self):
        dt = datetime.now(pytz.utc).isoformat()
        params = urlencode({
            'dt': dt,
        })

        print(params)
        url = 'http://localhost:9751/echo_datetime?%s' % str(params)
        data = urlopen(url).read()

        assert dt == data
Example #4
0
    def test_echo_datetime(self):
        dt = datetime.now(pytz.utc).isoformat()
        params = urlencode({
            'dt': dt,
        })

        print(params)
        url = '%s/echo_datetime?%s' % (self.base_url, str(params))
        data = urlopen(url).read()

        assert dt == data
Example #5
0
    def test_echo_string(self):
        url = "http://localhost:9751/echo_string?s=punk"
        data = urlopen(url).read()

        assert data == b"punk"
Example #6
0
 def test_500_2(self):
     url = "http://localhost:9751/soap_exception"
     try:
         data = urlopen(url).read()
     except HTTPError as e:
         assert e.code == 500
Example #7
0
 def test_404(self):
     url = "http://localhost:9751/404"
     try:
         data = urlopen(url).read()
     except HTTPError as e:
         assert e.code == 404
Example #8
0
    def test_echo_integer(self):
        url = '%s/echo_integer?i=444' % self.base_url
        data = urlopen(url).read()

        assert data == b'444'
Example #9
0
    def test_echo_string(self):
        url = '%s/echo_string?s=punk' % self.base_url
        data = urlopen(url).read()

        assert data == b'punk'
Example #10
0
 def test_500_2(self):
     url = '%s/soap_exception' % self.base_url
     try:
         data = urlopen(url).read()
     except HTTPError as e:
         assert e.code == 500
Example #11
0
 def test_500_2(self):
     url = 'http://localhost:9751/soap_exception'
     try:
         data = urlopen(url).read()
     except HTTPError as e:
         assert e.code == 500
Example #12
0
    def test_echo_integer(self):
        url = "http://localhost:9751/echo_integer?i=444"
        data = urlopen(url).read()

        assert data == b"444"
Example #13
0
    def test_echo_integer(self):
        url = '%s/echo_integer?i=444' % self.base_url
        data = urlopen(url).read()

        assert data == b'444'
Example #14
0
    def test_echo_string(self):
        url = '%s/echo_string?s=punk' % self.base_url
        data = urlopen(url).read()

        assert data == b'punk'
Example #15
0
 def test_500_2(self):
     url = '%s/soap_exception' % self.base_url
     try:
         data = urlopen(url).read()
     except HTTPError as e:
         assert e.code == 500
Example #16
0
 def test_404(self):
     url = '%s/404' % self.base_url
     try:
         data = urlopen(url).read()
     except HTTPError as e:
         assert e.code == 404
Example #17
0
    def test_echo_integer(self):
        url = 'http://localhost:9751/echo_integer?i=444'
        data = urlopen(url).read()

        assert data == b'444'
Example #18
0
    def test_echo_string(self):
        url = 'http://localhost:9751/echo_string?s=punk'
        data = urlopen(url).read()

        assert data == b'punk'
Example #19
0
 def test_404(self):
     url = '%s/404' % self.base_url
     try:
         data = urlopen(url).read()
     except HTTPError as e:
         assert e.code == 404
Example #20
0
 def test_404(self):
     url = 'http://localhost:9751/404'
     try:
         data = urlopen(url).read()
     except HTTPError as e:
         assert e.code == 404