def setUp(self):
        self.procedure = factories.ProcedureFactory(author='tester',
                                                    title='test procedure')

        self.generator = generators.ProcedureGenerator(self.procedure)
        self.procedure_etree_element = self.generator.generate()
        self.attribs = self.procedure_etree_element.attrib
    def test_error_if_blank_author(self):
        procedure = factories.ProcedureFactory(author='')

        generators.ProcedureGenerator(procedure).generate()
    def test_error_if_no_author(self):
        procedure = factories.ProcedureFactory()
        procedure.author = None

        generators.ProcedureGenerator(procedure).generate()
    def test_error_if_blank_title(self):
        procedure = factories.ProcedureFactory(title='')

        generators.ProcedureGenerator(procedure).generate()
    def test_error_if_no_title(self):
        procedure = factories.ProcedureFactory()
        procedure.title = None

        generators.ProcedureGenerator(procedure).generate()