def test_write_row_1(): """test_write_row_1 - write private only""" row = [x for x in xrange(27)] private_file_handle = exp.DummyObjectWithExpectations() private_file_handle.expect('writerow', (row,), {}) public_file_handle = None dailyUrl.write_row((private_file_handle, public_file_handle), row)
def test_write_row_2(): """test_write_row_2 - write both public and private""" row = [x for x in xrange(28)] private_file_handle = exp.DummyObjectWithExpectations() private_file_handle.expect('writerow', (row,), {}) public_row = [x for x in xrange(28)] public_row[1] = 'URL (removed)' public_row[17] = '' public_file_handle = exp.DummyObjectWithExpectations() public_file_handle.expect('writerow', (public_row,), {}) dailyUrl.write_row((private_file_handle, public_file_handle), row)