!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 

uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/mercader_api/tests/   drwxr-xr-x
Free 10.24 GB of 29.4 GB (34.82%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     client_test.py (1.17 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import unittest
import requests
import jsonschema
import json

class ClientTest(unittest.TestCase):

   def setUp(self):
      import config_loader
      self.__url = config_loader.client_url
      with open('./schemas/client_list.json') as json_file:
         self.__list_schema = json.load(json_file)
 
   def test_get_collection(self):
      r = requests.get(self.__url)
      jsonschema.validate(r.json(), self.__list_schema)
      self.assertEqual(r.status_code, 200)

   def test_insert_client(self):
      import uuid
      # get a substr of the uuid generated
      client_name = str(uuid.uuid4())[0:25]
      # there is a difference between get and post
      # we use telephone as key name in get and phone in post
      client = {
          'province': '',
          'city': 'RESISTENCIA',
          'expresso': '',
          'name': client_name,
          'cuit': '20108828987',
          'mail': '',
          'phone': '(03722)424151   /  15218080',
          'address': 'ARTURO FRONDIZI 223',
          'business_name': client_name,
          'id': 1
      }
      
      response = requests.post(self.__url, data=json.dumps(client))
      self.assertEqual(response.status_code, 200)


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0059 ]--