예제 #1
0
    def test_generates_tree(self):
        tree = ProtocolBuilder.generate_etree(factories.UserFactory(), self.procedure.id)

        assert_equals(len(tree), 4)

        for child in tree:
            assert_equals(len(child), 1)
예제 #2
0
 def test_procedure_does_not_exist(self):
     ProtocolBuilder.generate(factories.UserFactory(), -1)
예제 #3
0
    def test_invalid_owner(self):
        bad_user = factories.UserFactory(username="******")

        ProtocolBuilder.generate(bad_user, self.procedure.id)
예제 #4
0
 def test_generates_string_output(self):
     protocol = ProtocolBuilder.generate(factories.UserFactory(), self.procedure.id)
     assert_not_equals(protocol, None)