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

Side by Side Diff: sitescripts/stats/test/logprocessor.py

Issue 29329315: Issue 2983 - Make sure that the new lastVersion format is recognized and exceptions don`t break eve… (Closed)
Patch Set: Created Oct. 21, 2015, 9:53 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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-2015 Eyeo GmbH 4 # Copyright (C) 2006-2015 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 "adblockplus/2.3.1", 138 "adblockplus/2.3.1",
139 "firefox/22.0", 139 "firefox/22.0",
140 "gecko/23.0", 140 "gecko/23.0",
141 "unknown", 141 "unknown",
142 "unknown", 142 "unknown",
143 "firstDownload", 143 "firstDownload",
144 ), 144 ),
145 ( 145 (
146 datetime(2013, 07, 31, 12, 03, 00), 146 datetime(2013, 07, 31, 12, 03, 00),
147 "easylist.txt", 147 "easylist.txt",
148 "addonName=adblockplus&addonVersion=2.3.1&platform=gecko&platformVersion =23.0&lastVersion=201307311200", 148 "addonName=adblockplus&addonVersion=2.3.1&platform=gecko&platformVersion =23.0&lastVersion=201307311200-1/0",
149 "-", 149 "-",
150 "adblockplus/2.3.1", 150 "adblockplus/2.3.1",
151 "unknown/unknown", 151 "unknown/unknown",
152 "gecko/23.0", 152 "gecko/23.0",
153 "0 hour(s)", 153 "0 hour(s)",
154 "same day", 154 "same day",
155 "", 155 "",
156 ), 156 ),
157 ( 157 (
158 datetime(2013, 07, 31, 12, 03, 00), 158 datetime(2013, 07, 31, 12, 03, 00),
159 "easylist.txt", 159 "easylist.txt",
160 "addonName=adblockplus&addonVersion=2.3.1&platform=gecko&platformVersion =23.0&lastVersion=201307302200", 160 "addonName=adblockplus&addonVersion=2.3.1&platform=gecko&platformVersion =23.0&lastVersion=201307302200-1/3",
161 "-", 161 "-",
162 "adblockplus/2.3.1", 162 "adblockplus/2.3.1",
163 "unknown/unknown", 163 "unknown/unknown",
164 "gecko/23.0", 164 "gecko/23.0",
165 "14 hour(s)", 165 "14 hour(s)",
166 "1 day(s)", 166 "1 day(s)",
167 "firstInDay", 167 "firstInDay",
168 ), 168 ),
169 ( 169 (
170 datetime(2013, 07, 31, 12, 03, 00), 170 datetime(2013, 07, 31, 12, 03, 00),
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 "addonName": {"bar": {"hits": 1, "bandwidth": 200}} 730 "addonName": {"bar": {"hits": 1, "bandwidth": 200}}
731 }, 731 },
732 ), 732 ),
733 ] 733 ]
734 for info, section, ignored_fields, expected_result in tests: 734 for info, section, ignored_fields, expected_result in tests:
735 logprocessor.add_record(info, section, ignored_fields) 735 logprocessor.add_record(info, section, ignored_fields)
736 self.assertEqual(section, expected_result) 736 self.assertEqual(section, expected_result)
737 737
738 if __name__ == '__main__': 738 if __name__ == '__main__':
739 unittest.main() 739 unittest.main()
OLDNEW
« sitescripts/stats/bin/logprocessor.py ('K') | « sitescripts/stats/bin/logprocessor.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld