Пример #1
0
def test_writebulkjob(mock_dump):
    """ ensure job def calls json.dump """
    bulk = Bulk(test=True)
    bulk.job = JOB_EXPORTS_CONTACTS
    mock_dump.return_value = None
    bulk.write_job('/tmp/pyeloqua_test_bulk_write.json')
    assert mock_dump.called
def test_writebulkjob(mock_dump):
    """ ensure job def calls json.dump """
    bulk = Bulk(test=True)
    bulk.job = JOB_EXPORTS_CONTACTS
    mock_dump.return_value = None
    bulk.write_job('/tmp/pyeloqua_test_bulk_write.json')
    assert mock_dump.called
Пример #3
0
def test_readbulkjob():
    """ import correctly sets Bulk.job """
    bulk1 = Bulk(test=True)
    bulk1.job = JOB_EXPORTS_CONTACTS
    bulk1.write_job('/tmp/pyeloqua_test_bulk_write.json')
    bulk2 = Bulk(test=True)
    bulk2.read_job('/tmp/pyeloqua_test_bulk_write.json')
    assert bulk2.job == bulk1.job
def test_readbulkjob():
    """ import correctly sets Bulk.job """
    bulk1 = Bulk(test=True)
    bulk1.job = JOB_EXPORTS_CONTACTS
    bulk1.write_job('/tmp/pyeloqua_test_bulk_write.json')
    bulk2 = Bulk(test=True)
    bulk2.read_job('/tmp/pyeloqua_test_bulk_write.json')
    assert bulk2.job == bulk1.job