def test_fromdict(self):
        header_dict = self.header_arquivo.todict()
        header_arquivo = itau.registros.HeaderArquivo(**header_dict)
        self.assertEqual(header_arquivo.cedente_nome,
                                                'TRACY TECNOLOGIA LTDA ME')
        self.assertEqual(header_arquivo.nome_do_banco, 'BANCO ITAU SA')
def force(title, pos, force, xlabel='', ax=0):
    """plot force vs position"""
    unit = 'N'
    scale = 1
    if min(force) < -9.9e3 or max(force) > 9.9e3:
        scale = 1e-3
        unit = 'kN'
    if ax == 0:
        ax = plt.gca()
    ax.set_title('{} / {}'.format(title, unit))
    ax.grid(True)
    ax.plot(pos, [scale*f for f in force])
    if xlabel:
        ax.set_xlabel(xlabel)
    if min(force) > 0:
        ax.set_ylim(bottom=0)