Beispiel #1
0
 def test_update_member(self):
     p = producer.MemberProducer()
     member_model = data_models.Member(id=10)
     member_updates = member.MemberPUT(enabled=False)
     p.update(member_model, member_updates)
     kw = {
         'member_id': member_model.id,
         'member_updates': member_updates.to_dict(render_unsets=False)
     }
     self.mck_client.cast.assert_called_once_with({}, 'update_member', **kw)
Beispiel #2
0
 def test_delete_member(self):
     p = producer.MemberProducer()
     p.delete(self.mck_model)
     kw = {'member_id': self.mck_model.id}
     self.mck_client.cast.assert_called_once_with({}, 'delete_member', **kw)