Skip to content
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

Update nautobot-app for current design standards #205

Open
gsnider2195 opened this issue Dec 17, 2024 · 0 comments
Open

Update nautobot-app for current design standards #205

gsnider2195 opened this issue Dec 17, 2024 · 0 comments

Comments

@gsnider2195
Copy link
Contributor

gsnider2195 commented Dec 17, 2024

After the Load Balancers app virtualserver model is fully implemented, go back through the PRs and update the cookiecutter to match the current design standards and best practices where necessary. Examples:

  • Delete tests/test_api_views.py
  • Update TestCase base classes:
    • test_api.py should be nautobot.core.testing.api.APIViewTestCases.APIViewTestCase
    • test_filters.py should be nautobot.apps.testing.FilterTestCases.FilterTestCase
    • test_forms.py should be nautobot.apps.testing.FormTestCases.BaseFormTestCase
    • test_models.py should be nautobot.apps.testing.ModelTestCases.BaseModelTestCase
  • Add the attributes to the test classes that must be filled out for the generic tests to work (APIViewTestCase.choices_fields, APIViewTestCase.create_data, PrimaryObjectViewTestCase.form_data, etc)
  • Add a sample setUpTestData to the API and view tests with a comment explaining that 3 instances must be created in order for the generic deletion tests to work
  • Fix MRO of the example filterset in filters.py
  • The example model form Meta.fields should be __all__
  • The example filterset Meta.fields should be __all__
  • We should probably add the minimum recommended extras_features for the example model definition
  • The url patterns should be using the model's plural name. We should probably add a comment explaining the correct pattern (virtual-servers instead of virtualserver)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant