ajenti / ajenti

Assert statement used outside of tests BAN-B101
Security
Major
6 months agoa year old
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
150        assert not os.path.exists(path)
151        rq = requests.post(f'{url}/api/filesystem/create-directory/{path}')
152        assert rq.status_code == 200
153        assert os.path.isdir(path)
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
149        path = self.path('create_dir_test')
150        assert not os.path.exists(path)
151        rq = requests.post(f'{url}/api/filesystem/create-directory/{path}')
152        assert rq.status_code == 200153        assert os.path.isdir(path)
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
147
148    def test_create_dir(self):
149        path = self.path('create_dir_test')
150        assert not os.path.exists(path)151        rq = requests.post(f'{url}/api/filesystem/create-directory/{path}')
152        assert rq.status_code == 200
153        assert os.path.isdir(path)
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
143        assert not os.path.exists(path)
144        rq = requests.post(f'{url}/api/filesystem/create-file/{path}')
145        assert rq.status_code == 200
146        assert os.path.isfile(path)147
148    def test_create_dir(self):
149        path = self.path('create_dir_test')
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
142        path = self.path('create_file_test')
143        assert not os.path.exists(path)
144        rq = requests.post(f'{url}/api/filesystem/create-file/{path}')
145        assert rq.status_code == 200146        assert os.path.isfile(path)
147
148    def test_create_dir(self):