Fixtures

Módulo que contem exemplos de objetos relacinados as tabelas dos bancos.

fixtures.clear_tables()

Clear all data in tables for the current session.

Works only with the «memory» connector used in tests.

fixtures.populate(*, app=None, driver=None, size=1, factories=None)

Populate database with some examples.

Args:
session:
The current SQL alchemy session object.
app:
Flask application instance.
driver (str):
Driver name used to create a connection
size (int):
Optional size used to generate values from the factory functions
factories:
A list of factory functions. Each factory function is a callable that return a list of objects and might accept an optional size argument.
fixtures.fixture_for_pytest(factories, size=1)

Create a Pytest fixture from a list of factories.

fixtures.examples(size=1)

Populate using the provided factories and remove objects after leaving the with block.

Examples:
>>> with examples([factory1, factory2]) as objs:
...     do_something_with_objects(objs)
... # now the database is clean!

Agentes

fixtures.nomes_example()
fixtures.agentes_example()
fixtures.internet_example()
fixtures.pais_example()
fixtures.uf_example()
fixtures.municipio_example()
fixtures.deslocamento_example()

Base

fixtures.prorrogacao_example()

BDCorporativo

fixtures.tbcomprovantepagamentoxplanilhaaprovacao_example()
fixtures.tbcomprovantepagamento_example()
fixtures.arquivo_imagem_example()
fixtures.documento_example()
fixtures.documento_projeto_example()

Fake

fixtures.custos_example()

SAC

fixtures.areas_example()
fixtures.projeto_example()
fixtures.pre_projeto_example()
fixtures.segmento_example()
fixtures.enquadramento_example()
fixtures.mecanismo_example()
fixtures.situacao_example()
fixtures.interessado_example()
fixtures.captacao_example()
fixtures.certidoes_negativas_example()
fixtures.verificacao_example()
fixtures.plano_divulgacao_example()
fixtures.produto_example()
fixtures.plano_distribuicao_example()

Tabelas