def test_change_group(self): self.client.call = Mock(return_value='') vm = oca.User(self.xml, self.client) vm.chgrp(3) self.client.call.assert_called_once_with('user.chgrp', '3', 3)
def test_change_passwd(self): self.client.call = Mock(return_value='') u = oca.User(self.xml, self.client) u.change_passwd('secret2') self.client.call.assert_called_once_with('user.passwd', '3', 'secret2')
def test_delete(self): self.client.call = Mock(return_value='') vm = oca.User(self.xml, self.client) vm.delete() self.client.call.assert_called_once_with('user.delete', '3')
def test_repr(self): u = oca.User(self.xml, self.client) assert u.__repr__() == '<oca.User("dan")>'