Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: sitescripts/stats/test/logprocessor.py

Issue 5438786527821824: Issue 527 - Only process notification requests sent by our own extensions (Closed)
Left Patch Set: Created May 22, 2014, 7:20 a.m.
Right Patch Set: Added test case Created May 22, 2014, 8:40 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « sitescripts/stats/bin/logprocessor.py ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 # coding: utf-8 1 # coding: utf-8
2 2
3 # This file is part of the Adblock Plus web scripts, 3 # This file is part of the Adblock Plus web scripts,
4 # Copyright (C) 2006-2014 Eyeo GmbH 4 # Copyright (C) 2006-2014 Eyeo GmbH
5 # 5 #
6 # Adblock Plus is free software: you can redistribute it and/or modify 6 # Adblock Plus is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License version 3 as 7 # it under the terms of the GNU General Public License version 3 as
8 # published by the Free Software Foundation. 8 # published by the Free Software Foundation.
9 # 9 #
10 # Adblock Plus is distributed in the hope that it will be useful, 10 # Adblock Plus is distributed in the hope that it will be useful,
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 "adblockplus/2.3.1", 222 "adblockplus/2.3.1",
223 "unknown/unknown", 223 "unknown/unknown",
224 "gecko/23.0", 224 "gecko/23.0",
225 "1 year(s)", 225 "1 year(s)",
226 "1 year(s)", 226 "1 year(s)",
227 "firstInMonth firstInWeek firstInDay", 227 "firstInMonth firstInWeek firstInDay",
228 ), 228 ),
229 ( 229 (
230 datetime(2013, 07, 31, 12, 03, 00), 230 datetime(2013, 07, 31, 12, 03, 00),
231 "easylist.txt", 231 "easylist.txt",
232 "addonName=adblockedge&addonVersion=2.1.2&platform=gecko&platformVersion =23.0.1&lastVersion=201206302200",
233 "-",
234 "adblockedge/2.1.2",
235 "unknown/unknown",
236 "gecko/23.0",
237 "1 year(s)",
238 "unknown",
239 "firstInMonth firstInWeek firstInDay",
240 ),
241 (
242 datetime(2013, 07, 31, 12, 03, 00),
243 "easylist.txt",
232 "_=1375142394357", 244 "_=1375142394357",
233 "AdBlock/2.5.4", 245 "AdBlock/2.5.4",
234 "chromeadblock/2.5.4", 246 "chromeadblock/2.5.4",
235 "unknown/unknown", 247 "unknown/unknown",
236 "unknown/unknown", 248 "unknown/unknown",
237 "unknown", 249 "unknown",
238 "unknown", 250 "unknown",
239 "" 251 ""
240 ), 252 ),
241 ] 253 ]
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 "addonName": {"bar": {"hits": 1, "bandwidth": 200}} 656 "addonName": {"bar": {"hits": 1, "bandwidth": 200}}
645 }, 657 },
646 ), 658 ),
647 ] 659 ]
648 for info, section, ignored_fields, expected_result in tests: 660 for info, section, ignored_fields, expected_result in tests:
649 logprocessor.add_record(info, section, ignored_fields) 661 logprocessor.add_record(info, section, ignored_fields)
650 self.assertEqual(section, expected_result) 662 self.assertEqual(section, expected_result)
651 663
652 if __name__ == '__main__': 664 if __name__ == '__main__':
653 unittest.main() 665 unittest.main()
LEFTRIGHT

Powered by Google App Engine
This is Rietveld