======================================
iIntids Utility Sample Data Generation
======================================

This generator creates an IntIds utility.

  >>> from z3c.sampledata.generator.intids import SampleIntIds
  >>> generator = SampleIntIds()

For the creation of the utility we need a site.
To create our site we use the site generator.

  >>> from pprint import pprint
  >>> from zope import component
  >>> from z3c.sampledata.interfaces import ISampleDataPlugin
  >>> from z3c.sampledata import Manager
  >>> from z3c.sampledata.generator.site import SampleSite
  >>> component.provideUtility(SampleSite(),
  ...                          ISampleDataPlugin,
  ...                          'z3c.sampledata.site')
  >>> manager = Manager('manager', '')
  >>> manager.add('z3c.sampledata.site')
  >>> from zope.app.folder.folder import Folder
  >>> infos = manager.generate(context=root,
  ...                          param={'z3c.sampledata.site':
  ...                                      {'sitename':'test'}},
  ...                          seed=None)
  >>> root['test']
  <zope.app.folder.folder.Folder object at ...>

Now that everything is set up we can generate the intids utility-

  >>> site = root['test']
  >>> generator.generate(site)
  <zope.app.intid.IntIds object at ...>
  >>> 'intid' in site.getSiteManager()['default']
  True
  >>> from zope import component
  >>> from zope.app.intid.interfaces import IIntIds
  >>> component.getUtility(IIntIds)
  <zope.app.intid.IntIds object at ...>

