Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(92)

Unified Diff: python/test/testtransitfeed.py

Issue 75063: Adding validation for uniqueness of service_id X date in calendar_dates SVN Base: http://googletransitdatafeed.googlecode.com/svn/trunk/
Patch Set: Removing unnecessary linebreak Created 1 month, 1 week ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
« no previous file | python/transitfeed.py » ('j') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: python/test/testtransitfeed.py
===================================================================
--- python/test/testtransitfeed.py (revision 1127)
+++ python/test/testtransitfeed.py (working copy)
@@ -3212,6 +3212,21 @@
self.problems.AssertNoMoreExceptions()
+class DuplicateServiceIdDateWarningTestCase(MemoryZipTestCase):
+ def runTest(self):
+ # Two lines with the same value of service_id and date.
+ # Test for the warning.
+ self.zip.writestr(
+ 'calendar_dates.txt',
+ 'service_id,date,exception_type\n'
+ 'FULLW,20100604,1\n'
+ 'FULLW,20100604,2\n')
+ schedule = self.loader.Load()
+ e = self.problems.PopException('DuplicateID')
+ self.assertEquals('(service_id, date)', e.column_name)
+ self.assertEquals('(FULLW, 20100604)', e.value)
+
+
class AddStopTimeParametersTestCase(unittest.TestCase):
def runTest(self):
problem_reporter = TestFailureProblemReporter(self)
« no previous file | python/transitfeed.py » ('j')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r497