-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fixes #19687 - Treat cellular interface type as not connectable #19691
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -954,6 +954,19 @@ def test_cable_cannot_terminate_to_a_wireless_interface(self): | |
| with self.assertRaises(ValidationError): | ||
| cable.clean() | ||
|
|
||
| @tag('regression') | ||
| def test_cable_cannot_terminate_to_a_cellular_interface(self): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Derp, meant to also ask ... can you add a 'regression' tag here, like so? @tag('regression')
def test_cable_cannot_terminate_to_a_cellular_interface(self):
...
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can import it like from django.test import tag
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My bad I misunderstood the comment on the issue. I'll add and update the PR.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It couldn't have helped that it took me three comments to say what I meant to say. 🤦 Thanks! |
||
| """ | ||
| A cable cannot terminate to a cellular interface | ||
| """ | ||
| device1 = Device.objects.get(name='TestDevice1') | ||
| interface2 = Interface.objects.get(device__name='TestDevice2', name='eth0') | ||
|
|
||
| cellular_interface = Interface(device=device1, name="W1", type=InterfaceTypeChoices.TYPE_LTE) | ||
| cable = Cable(a_terminations=[interface2], b_terminations=[cellular_interface]) | ||
| with self.assertRaises(ValidationError): | ||
| cable.clean() | ||
|
|
||
|
|
||
| class VirtualDeviceContextTestCase(TestCase): | ||
|
|
||
|
|
||
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.
Thanks for adding the regression test!