Exemplo n.º 1
0
 def test_list_with_default_per_page(self, construct, execute):
     """Check list method set per_page as 1000 by default"""
     assert execute.return_value == Base.list(
         options={'organization-id': 1})
     assert 'list' == Base.command_sub
     construct.called_once_with({'per-page': 1000})
     execute.called_once_with(construct.return_value, output_format='csv')
Exemplo n.º 2
0
 def test_list_with_default_per_page(self, construct, execute):
     """Check list method set per_page as 1000 by default"""
     self.assertEquals(
         execute.return_value,
         Base.list(options={'organization-id': 1})
     )
     self.assertEqual('list', Base.command_sub)
     construct.called_once_with({'per-page': 1000})
     execute.called_once_with(construct.return_value, output_format='csv')
Exemplo n.º 3
0
 def test_list_requires_organization_id(self, _):
     """Check list raises CLIError with organization-id is not present in
     options
     """
     with pytest.raises(CLIError):
         Base.list()