class TestBaseWorkflowTypeQuerySet(unittest.TestCase): def setUp(self): self.domain = Domain("TestDomain") self.bw = BaseWorkflowQuerySet(self.domain) def tearDown(self): pass def test_get_domain_property_instantiates_private_attribute(self): bw = BaseWorkflowQuerySet(self.domain) delattr(bw, '_domain') dummy = bw.domain self.assertTrue(hasattr(bw, '_domain')) def test_instantiation_with_valid_domain(self): bw = BaseWorkflowQuerySet(self.domain) self.assertIsInstance(bw.domain, Domain) self.assertEqual(bw._domain, bw.domain) def test_instantiation_with_invalid_domain(self): with self.assertRaises(TypeError): BaseWorkflowQuerySet("WrongType") def test__list_isnt_implemented(self): with self.assertRaises(NotImplementedError): self.bw._list()
class TestBaseWorkflowTypeQuerySet(unittest.TestCase): def setUp(self): self.domain = Domain("TestDomain") self.bw = BaseWorkflowQuerySet(self.domain) def tearDown(self): pass def test_get_domain_property_instantiates_private_attribute(self): bw = BaseWorkflowQuerySet(self.domain) delattr(bw, '_domain') bw.domain self.assertTrue(hasattr(bw, '_domain')) def test_instantiation_with_valid_domain(self): bw = BaseWorkflowQuerySet(self.domain) self.assertIsInstance(bw.domain, Domain) self.assertEqual(bw._domain, bw.domain) def test_instantiation_with_invalid_domain(self): with self.assertRaises(TypeError): BaseWorkflowQuerySet("WrongType") def test__list_isnt_implemented(self): with self.assertRaises(NotImplementedError): self.bw._list()
def test_instantiation_with_invalid_domain(self): with self.assertRaises(TypeError): BaseWorkflowQuerySet("WrongType")
def test_instantiation_with_valid_domain(self): bw = BaseWorkflowQuerySet(self.domain) self.assertIsInstance(bw.domain, Domain) self.assertEqual(bw._domain, bw.domain)
def test_get_domain_property_instantiates_private_attribute(self): bw = BaseWorkflowQuerySet(self.domain) delattr(bw, '_domain') dummy = bw.domain self.assertTrue(hasattr(bw, '_domain'))
def setUp(self): self.domain = Domain("TestDomain") self.bw = BaseWorkflowQuerySet(self.domain)
def setUp(self): self.domain = Domain("TestDomain") self.bw = BaseWorkflowQuerySet(self.domain)