#!/usr/bin/env python
# encoding: utf-8
"""
test_setup.py

Created by 寺田 学 on 2008-11-06.
Copyright (c) 2008 __MyCompanyName__. All rights reserved.
"""
# ./bin/zopectl test -s Products/P3sample


import base

class TestInstall(base.P3sampleTestCase):
    """  """
    def afterSetUp(self):
        pass

    def testQuickInstall(self):
        qi = self.portal.portal_quickinstaller
        self.failUnless('P3sample' in (p['id'] for p in qi.listInstallableProducts()))
        qi.installProduct('P3sample')
        self.failUnless(qi.isProductInstalled('P3sample'))

def test_suite():
    from unittest import TestSuite, makeSuite
    suite = TestSuite()
    suite.addTest(makeSuite(TestInstall))
    return suite