=== modified file 'lib/lp/registry/interfaces/person.py'
--- lib/lp/registry/interfaces/person.py	2010-11-18 12:05:34 +0000
+++ lib/lp/registry/interfaces/person.py	2010-11-22 23:11:44 +0000
@@ -1075,10 +1075,10 @@
         since it inherits from `IPerson`) is a member of himself
         (i.e. `person1.inTeam(person1)`).
 
-        :param team: One of an object providing `IPerson`, the string name of a
-            team or `None`. If a string was supplied the team is looked up.
+        :param team: Either an object providing `IPerson`, the string name of
+            a team or `None`. If a string was supplied the team is looked up.
         :return: A bool with the result of the membership lookup. When looking
-            up the team from a string finds nothing or team was `None` then 
+            up the team from a string finds nothing or team was `None` then
             `False` is returned.
         """
 
@@ -1551,6 +1551,11 @@
         to INVITATION_DECLINED.
         """
 
+    @call_with(user=REQUEST_USER)
+    @operation_parameters(
+        team=copy_field(ITeamMembership['team']),
+        comment=Text(required=False))
+    @export_write_operation()
     def retractTeamMembership(team, user, comment=None):
         """Retract this team's membership in the given team.
 
@@ -2238,6 +2243,7 @@
     (IPersonEditRestricted['addMember'], 'person'),
     (IPersonEditRestricted['acceptInvitationToBeMemberOf'], 'team'),
     (IPersonEditRestricted['declineInvitationToBeMemberOf'], 'team'),
+    (IPersonEditRestricted['retractTeamMembership'], 'team'),
     ]
 for method, name in params_to_fix:
     method.queryTaggedValue(

=== modified file 'lib/lp/registry/stories/webservice/xx-person.txt'
--- lib/lp/registry/stories/webservice/xx-person.txt	2010-10-18 22:24:59 +0000
+++ lib/lp/registry/stories/webservice/xx-person.txt	2010-11-22 23:11:44 +0000
@@ -749,6 +749,18 @@
     >>> webservice.get("/~ubuntu-team/+member/name20").jsonBody()['status']
     u'Invitation declined'
 
+The retractTeamMembership method allows a team admin to remove his team from
+another team.
+
+    >>> print webservice.named_post(
+    ...     landscape_developers['self_link'], 'retractTeamMembership',
+    ...     {}, team=ubuntu_team['self_link'], comment='bye bye')
+    HTTP/1.1 200 Ok
+    ...
+    >>> webservice.get("/~ubuntu-team/+member/landscape-developers"
+    ...     ).jsonBody()['status']
+    u'Deactivated'
+
 To check whether or not a given person is a participant in a team, use the
 'inTeam' custom operation.
 

