-
-
Notifications
You must be signed in to change notification settings - Fork 490
Frontend - Analyzables page #2865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: frontend_analyzables
Are you sure you want to change the base?
Conversation
I suggest to change the target branch. Create another branch from develop and merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to swtch in the navbar the "dashboard" with "analyzables" in this way the dashboard is the first one from the left.
|
||
def get_queryset(self): | ||
user = self.request.user | ||
return super().get_queryset().visible_for_user(user) | ||
|
||
@action(detail=False, methods=["post"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why a post insted of a get?
def test_list(self): | ||
self.client.force_authenticate(user=self.user) | ||
response = self.client.get(self.URL) | ||
self.assertEqual(response.status_code, 200, response.content) | ||
result = response.json() | ||
self.assertIn("count", result) | ||
self.assertEqual(result["count"], 1) | ||
|
||
def test_get_analyzables(self): | ||
self.client.force_authenticate(user=self.user) | ||
response = self.client.post( | ||
f"{self.URL}/get_analyzables", | ||
data=["test.com"], | ||
format="json", | ||
) | ||
self.assertEqual(response.status_code, 200, response.content) | ||
result = response.json() | ||
self.assertEqual(result[0]["id"], self.an.pk) | ||
|
||
self.client.force_authenticate(user=self.user) | ||
response = self.client.post( | ||
f"{self.URL}/get_analyzables", | ||
data=["noanalyzable.com"], | ||
format="json", | ||
) | ||
self.assertEqual(response.status_code, 200, response.content) | ||
result = response.json() | ||
self.assertEqual(result[0]["tags"], ["not_found"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
list and get_analyzables seems very similar, we need a custom API ? We cannot just call the list ?
Description
Type of change
Please delete options that are not relevant.
Checklist
develop
dumpplugin
command and added it in the project as a data migration. ("How to share a plugin with the community")test_files.zip
and you added the default tests for that mimetype in test_classes.py.FREE_TO_USE_ANALYZERS
playbook by following this guide.url
that contains this information. This is required for Health Checks._monkeypatch()
was used in its class to apply the necessary decorators.MockUpResponse
of the_monkeypatch()
method. This serves us to provide a valid sample for testing.# This file is a part of IntelOwl https://github.com/intelowlproject/IntelOwl # See the file 'LICENSE' for copying permission.
Black
,Flake
,Isort
) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.tests
folder). All the tests (new and old ones) gave 0 errors.DeepSource
,Django Doctors
or other third-party linters have triggered any alerts during the CI checks, I have solved those alerts.Important Rules