-
Notifications
You must be signed in to change notification settings - Fork 45
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
Remove widget references before removing it #249
Conversation
@@ -115,6 +115,20 @@ def test_remove_widget_from_workspace(self): | |||
self.login(username="user_with_workspaces", next="/user_with_workspaces/Workspace") | |||
self.find_widget(title="Test 1").remove() | |||
|
|||
def test_remove_widget_from_workspace_with_behaviours(self): |
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.
Remove this selenium test and provide a unit test based on the current test_iwidget_removed
test provided by the WiringTestCase
class (wirecloud/platform/wiring/tests.py
).
@@ -22,7 +22,7 @@ | |||
from django.utils.translation import ugettext as _ | |||
|
|||
from wirecloud.commons.fields import JSONField | |||
from wirecloud.platform.wiring.utils import remove_related_iwidget_connections |
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.
Take into account that this function is not used from a class, please, provide a more descriptive name (e.g. remove_widget_from_wiring_status
or remove_related_widget_connections
)
@@ -29,38 +29,43 @@ | |||
from wirecloud.platform.plugins import get_operator_api_extensions | |||
|
|||
|
|||
def has_component(endpoint, component_id, component_type): | |||
c_type, c_id, e_name = tuple(endpoint.split('/')) | |||
def remove_component(component_type, component_id, wiring_status): |
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 are implementing a generic remove_component
if we are not removing operators
?
e4cc553
to
c4e6de3
Compare
c88c3c5
to
7b1922b
Compare
The following commits fix #248 and #250