    hurry.yui basic tests
    =====================

    Here are some basic tests for hurry.yui.

    Let's set up a way to render URLs; typically the framework has already
    done this::

      >>> class Plugin(object):
      ...   def get_library_url(self, library):
      ...     return 'http://localhost/static/%s' % (
      ...       library.name)
      >>> from hurry.resource import register_plugin
      >>> register_plugin(Plugin())

    Let's check the YUI structure by picking out a resource in it::

      >>> from hurry import yui
      >>> from hurry.resource import NeededInclusions
      >>> needed = NeededInclusions()
      >>> needed.need(yui.fonts)
      >>> print needed.render()
    Let's try a resource that has a dependency on fonts, namely
    ``grids``::

      >>> needed = NeededInclusions()
      >>> needed.need(yui.grids)
      >>> print needed.render()
    Let's need two resources at the same time::

      >>> needed = NeededInclusions()
      >>> needed.need(yui.grids)
      >>> needed.need(yui.reset)
      >>> print needed.render()
    Let's get the same, minified::

      >>> needed.mode('minified')
      >>> print needed.render()
Now let's try to see consolidation: we include grids and reset at the same time. Since this time we enable rolling up, we expect to see the rollup ``reset-fonts-grids``:: >>> needed = NeededInclusions() >>> needed.rollup() >>> needed.need(yui.grids) >>> needed.need(yui.reset) >>> print needed.render()
    Requesting minification has no effect on rollups, as the original
    rollup is already minified::

      >>> needed = NeededInclusions()
      >>> needed.rollup()
      >>> needed.mode('minified')
      >>> needed.need(yui.grids)
      >>> needed.need(yui.reset)
      >>> print needed.render()