code stringlengths 3 6.57k |
|---|
allegation_download.write_disclaimer() |
call.write('A1', line_1) |
call.write('A2', line_2) |
mock_worksheet.assert_has_calls(expected_calls) |
patch('allegation.services.download_allegations.xlsxwriter.Workbook') |
test_investigator_name_rank_in_allegation_sheet(self, mock_workbook) |
OfficerAllegationFactory() |
AllegationsDownload(DownloadFactory() |
allegation_download.update_crids() |
MagicMock() |
MagicMock() |
patch('allegation.services.download_allegations.os') |
allegation_download.init_workbook() |
allegation_download.write_allegations_columns(mock_worksheet) |
sheet.should.equal(mock_worksheet) |
set(columns) |
set(['InvestigatorName', 'InvestigatorRank']) |
allegation_download.write_allegations_data(mock_worksheet) |
mock_worksheet.write.assert_any_call(1, 21, officer_allegation_1.allegation.investigator.name) |
mock_worksheet.write.assert_any_call(1, 22, investigator.current_rank) |
patch('allegation.services.download_allegations.xlsxwriter.Workbook') |
test_complaining_witness_sheet(self, mock_workbook) |
AllegationFactory() |
ComplainingWitnessFactory(allegation=allegation, crid=allegation.crid) |
OfficerAllegationFactory(allegation=allegation) |
AllegationsDownload(DownloadFactory() |
allegation_download.update_crids() |
MagicMock() |
patch('allegation.services.download_allegations.os') |
allegation_download.init_workbook() |
MagicMock() |
MagicMock(return_value=mock_worksheet) |
allegation_download.write_complaint_witnesses() |
sheet.should.equal(mock_worksheet) |
columns.should.equal(['CRID', 'Gender', 'Race', 'Age']) |
mock_worksheet.write.assert_any_call(1, 0, str(allegation.crid) |
mock_worksheet.write.assert_any_call(1, 1, witness.gender) |
mock_worksheet.write.assert_any_call(1, 2, witness.race) |
mock_worksheet.write.assert_any_call(1, 3, witness.age) |
patch('allegation.services.download_allegations.xlsxwriter.Workbook') |
test_officer_sheet(self, mock_workbook) |
AllegationFactory() |
OfficerFactory() |
OfficerAllegationFactory(allegation=allegation, officer=officer) |
AllegationsDownload(DownloadFactory() |
allegation_download.update_crids() |
MagicMock() |
patch('allegation.services.download_allegations.os') |
allegation_download.init_workbook() |
MagicMock() |
MagicMock(return_value=mock_worksheet) |
allegation_download.write_officer_profile() |
sheet.should.equal(mock_worksheet) |
mock_worksheet.write.assert_any_call(1, 0, officer.id) |
mock_worksheet.write.assert_any_call(1, 1, officer.officer_first) |
mock_worksheet.write.assert_any_call(1, 2, officer.officer_last) |
mock_worksheet.write.assert_any_call(1, 3, officer.gender) |
mock_worksheet.write.assert_any_call(1, 4, officer.race) |
mock_worksheet.write.assert_any_call(1, 5, officer.appt_date) |
mock_worksheet.write.assert_any_call(1, 6, officer.unit.unit_name) |
mock_worksheet.write.assert_any_call(1, 7, officer.rank) |
mock_worksheet.write.assert_any_call(1, 8, officer.star) |
mock_worksheet.write.assert_any_call(1, 9, officer.age) |
set() |
in ('matchers', 'rules') |
os.walk(folder) |
rule_file.endswith('.pyc') |
root.replace('/', '.') |
os.path.splitext(import_file) |
modules_to_import.add('{}.{}'.format(package_path, import_module) |
importlib.import_module(module_name) |
handler(event, context) |
StreamAlert(context) |
run(event) |
BlockNumber(1150000) |
BlockNumber(1920000) |
BlockNumber(2463000) |
BlockNumber(2675000) |
BlockNumber(4370000) |
BlockNumber(7080000) |
execfile() |
extensions (or modules to document with autodoc) |
sys.path.insert(0, os.path.abspath('.') |
Sphinx (named 'sphinx.ext.*') |
Pygments (syntax highlighting) |
files (such as style sheets) |
size ('letterpaper' or 'a4paper') |
size ('10pt', '11pt' or '12pt') |
figure (float) |
ProcessLink(transforms.Transform) |
find_replace(self, node) |
isinstance(node, nodes.reference) |
r.endswith(".md") |
isinstance(node, nodes.Text) |
self.text_replacements.items() |
node.astext() |
nodes.Text(node.replace(k, v) |
node.parent.replace(node, repl) |
traverse(self, node) |
self.find_replace(node) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.