示例#1
0
 def test_coerceProductReturn(self):
     """
     Verify that L{ProductFragment.coerceProduct} returns a string
     indicating success.
     """
     createdProducts = []
     fragment = ProductFragment(StubProductConfiguration(createdProducts))
     result = fragment.coerceProduct()
     self.assertEqual(result, u'Created.')
示例#2
0
 def test_coerceProductReturn(self):
     """
     Verify that L{ProductFragment.coerceProduct} returns a string
     indicating success.
     """
     createdProducts = []
     fragment = ProductFragment(StubProductConfiguration(createdProducts))
     result = fragment.coerceProduct()
     self.assertEqual(result, u'Created.')
示例#3
0
 def test_coerceProduct(self):
     """
     Verify that L{ProductFragment.coerceProduct} calls C{createProduct} on
     the object it wraps and passes its arguments through.
     """
     createdProducts = []
     fragment = ProductFragment(StubProductConfiguration(createdProducts))
     fragment.coerceProduct(foo=u'bar', baz=u'quux')
     self.assertEqual(map(sorted, createdProducts), [[u'bar', u'quux']])
示例#4
0
 def test_coerceProduct(self):
     """
     Verify that L{ProductFragment.coerceProduct} calls C{createProduct} on
     the object it wraps and passes its arguments through.
     """
     createdProducts = []
     fragment = ProductFragment(StubProductConfiguration(createdProducts))
     fragment.coerceProduct(foo=u'bar', baz=u'quux')
     self.assertEqual(createdProducts, [[u'bar', u'quux']])