-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add API Endpoints #143
base: develop
Are you sure you want to change the base?
Add API Endpoints #143
Conversation
|
||
User = get_user_model() | ||
|
||
|
||
class SyncAPITest(APIViewTestCases.APIViewTestCase): # pylint: disable=too-many-ancestors |
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.
Do we not support all the "Not implemented" ones? Shouldn't for example deletion be supported via the API?
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 think some of the tests are certainly valid. I just wasn't sure how to go about actually testing them. I can work on building them out though. This was meant as an initial stab at adding the API endpoints to satisfy the referenced issue and to also get ready for the Nautobot 2.0 React UI.
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 believe that we should get the unit tests in along with the feature, otherwise its unclear when/if the unit tests will ever be enabled
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.
Agreed, I just need time to figure out the tests. I'm not familiar with how the API unit tests work so still working through that.
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.
Here you should use separate subclasses of APIViewTestCases
as this is a read-only API. That should cut down on the necessary @skip
annotations.
pass | ||
|
||
|
||
class SyncLogEntryAPITest(APIViewTestCases.APIViewTestCase): # pylint: disable=too-many-ancestors |
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.
Same thing about the different base class here since this is also read-only
Putting this on hold until I have time to work on the tests after the 2.0 release. |
7744f3b
to
0533fbb
Compare
This is adding initial skeleton required for serving the Sync and SyncLogEntry objects through the API.
0533fbb
to
db07239
Compare
This PR is for addressing #38 to make the Sync and SyncLogEntry objects available via API endpoints.