Repository: codeforpdx/recordexpungpdx
Issue: CaseParser is now crashing when parsing case 74 for J.D.

## Description
The Case Parser is now crashing on a case it had previously run through without issue. 

Changed files:
src/backend/expungeservice/crawler/parsers/case_parser.py, src/backend/tests/fixtures/case_details.py, src/backend/tests/parser/test_case_parser.py

diff --git a/src/backend/expungeservice/crawler/parsers/case_parser.py b/src/backend/expungeservice/crawler/parsers/case_parser.py
index 2fa1c856..9d352408 100644
--- a/src/backend/expungeservice/crawler/parsers/case_parser.py
+++ b/src/backend/expungeservice/crawler/parsers/case_parser.py
@@ -9,7 +9,8 @@ class CaseParser(HTMLParser):
 
     def __init__(self):
         HTMLParser.__init__(self)
-        self.current_table_number = 0
+        self.read_table_title = False
+        self.table_title = ''
         self.entering_table = False
         self.within_table_header = False
 
@@ -31,7 +32,7 @@ class CaseParser(HTMLParser):
     def handle_starttag(self, tag, attrs):
         if CaseParser.__at_table_title(tag, attrs):
             self.entering_table = True
-            self.current_table_number += 1
+            self.read_table_title = True
             self.within_table_header = True
             self.collect_charge_info = False
             self.collect_event_table = False
@@ -45,17 +46,17 @@ class CaseParser(HTMLParser):
             self.get_balance_due = True
 
     def handle_endtag(self, tag):
-        charge_table = 2
-        event_table = 3
-        financial_table = 4
+        charge_table = 'Charge Information'
+        event_table = 'Events & Orders of the Court'
+        financial_table = 'Financial Information'
 
         if self.__exiting_table_header(tag):
             self.within_table_header = False
-            if charge_table == self.current_table_number:
+            if charge_table == self.table_title:
                 self.collect_charge_info = True
-            elif event_table == self.current_table_number:
+            elif event_table == self.table_title:
                 self.collect_event_table = True
-            elif financial_table == self.current_table_number:
+            elif financial_table == self.table_title:
                 self.collect_financial_info = True
 
         if tag == 'body':
@@ -63,6 +64,10 @@ class CaseParser(HTMLParser):
             self.__create_charge_hash()
 
     def handle_data(self, data):
+        if self.read_table_title:
+            self.table_title = data
+            self.read_table_title = False
+
         if self.entering_table:
             self.entering_table = False
 
diff --git a/src/backend/tests/fixtures/case_details.py b/src/backend/tests/fixtures/case_details.py
index b9aa7a59..f2833a06 100644
--- a/src/backend/tests/fixtures/case_details.py
+++ b/src/backend/tests/fixtures/case_details.py
@@ -388,3 +388,97 @@ Defendant: JOHN DOE
   </body>
 </html>
     '''
+
+    CASEJD74 = '''
+<html>
+  <head>
+  </head>
+
+  <body>
+  
+        <?xml version="1.0" encoding="utf-8"?><table cellspacing="0" cellpadding="0" width="100%" border="0" style="table-layout: fixed; margin:0px; padding:0px;"></table><table cellspacing="0" cellpadding="0" width="100%" border="0" style="table-layout: fixed; margin:0px; padding:0px;"><tr><td bgcolor="#000000" height="20px"><table cellspacing="0" cellpadding="0" width="100%" border="0"><tr><td align="left" style="padding-left: 5px"><font size="1"><a class="ssBlackNavBarHyperlink" href="#MainContent">Skip to Main Content</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="logout.aspx">Logout</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="MyAccount.aspx?ReturnURL=default.aspx">My Account</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="default.aspx">Search Menu</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="Search.aspx?ID=100">Search Criminal, Traffic and Parking Case Records</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="Search.aspx?ID=100&amp;RefineSearch=1">Refine Search</a>&nbsp;<a class="ssBlackNavBarHyperlink" href="&#xD;&#xA;                          javascript:if((new String(window.location)).indexOf(&quot;#MainContent&quot;) &gt; 0)&#xD;&#xA;                          {&#xD;&#xA;                          history.back();&#xD;&#xA;                          history.back();&#xD;&#xA;                          }&#xD;&#xA;                          else history.back();&#xD;&#xA;                        ">
+                        Back</a>&nbsp;</font></td><td align="center" class="ssBlackNavBarLocation"></td><td align="right" style="padding-right: 10px"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="ssBlackNavBarLocation">
+                          Location : All Locations</td><td><font size="1"><a class="ssBlackNavBarHyperlink" target="_blank" href="http://www.courts.oregon.gov/services/online/Documents/OJCIN/OECI/PA_QRefG_OJIN.pdf">Help</a></font></td></tr></table></td></tr></table></td></tr></table><a id="MainContent" name="MainContent" tabindex="-1"></a><div class="ssCaseDetailROA" nowrap="true">Register of Actions</div><div class="ssCaseDetailCaseNbr" nowrap="true">
+          Case No. <span style="font-variant: normal">000332623</span></div><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td width="50%" valign="top"><b>State of Oregon VS. John D Doe</b></td><td>&sect;<br />&sect;<br />&sect;<br />&sect;<br />&sect;<br />&sect;<br />&sect;<br />&sect;<br /></td><td width="50%" valign="top" align="center"><table cellpadding="0" cellspacing="0" width="90%" border="0"><tr><td width="70%"><table cellpadding="0" cellspacing="0" width="100%" border="0"><cols><col width="50%" /><col width="50%" /></cols><tr><th class="ssTableHeaderLabel">Case Type:</th><td style="padding-left:10px"><b>Offense Felony</b></td></tr><tr><th class="ssTableHeaderLabel">Date Filed:</th><td style="padding-left:10px"><b>03/19/2000</b></td></tr><tr><th class="ssTableHeaderLabel">Location:</th><td style="padding-left:10px"><b>Multnomah</b></td></tr><tr><th class="ssTableHeaderLabel" valign="top">Booking Number:</th><td style="padding-left:10px" valign="top"><b>555555</b></td></tr><tr><th class="ssTableHeaderLabel" valign="top">Collection Agency Identification Number:</th><td style="padding-left:10px" valign="top"><b>555555</b></td></tr><tr><th class="ssTableHeaderLabel" valign="top">District Attorney Number:</th><td style="padding-left:10px" valign="top"><b>555555-B</b></td></tr></table></td></tr></table></td></tr></table><table cellpadding="0" cellspacing="0" style="width: 100%"><caption><div class="ssCaseDetailSectionTitle">Related Case Information</div></caption><tr><th id="RCIr1" class="ssTableHeader">
+          Related Cases
+        </th></tr><tr><td class="ssSmallText" headers="RCIr1" style="padding-left:10px">555555&nbsp;(Co-Defendant)
+              </td></tr></table><table cellpadding="0" cellspacing="0" width="100%" border="0" style="table-layout: fixed"><col width="10%" /><col width="30%" /><col width="10%" /><col width="30%" /><col width="20%" /><caption><div class="ssCaseDetailSectionTitle">Party Information</div></caption><tr><td colspan="4"></td><th class="ssTableHeader" id="PIc5">Attorneys</th></tr><tr><th class="ssTableHeader" valign="top" rowspan="2" id="PIr01">Defendant</th><th class="ssTableHeader" valign="top" id="PIr11">DOE, JOHN&nbsp;&nbsp;<i>Also Known As</i>&nbsp;&nbsp;bloopity bloop&nbsp;&nbsp;<i>Also Known As</i>&nbsp;&nbsp;DOE, JOHN D</th><td rowspan="2"></td><td rowspan="2" valign="top" headers="&#xD;&#xA;              PIr01 &#xD;&#xA;              PIr11">Male Black<br />
+                      DOB: 1970<br />6' 1", 195 lbs</td><td rowspan="2" valign="top" headers="&#xD;&#xA;              PIr01 &#xD;&#xA;              PIr11 &#xD;&#xA;              PIc5&#xD;&#xA;            "><b></b><br />  <I>Court Appointed</I><br />503 939-6514(W)<table><tr height="25"><td>&nbsp;</td></tr></table>

<br />  <I>
Court Appointed
</I><br />
503 295-2996(W)
<table><tr height="25"><td>&nbsp;</td></tr></table>

<br />  <I>
Court Appointed
</I><br />
503 281-3436(W)
<table><tr height="25"><td>&nbsp;</td></tr></table>

<br />  <I>
Court Appointed
</I><br />
503 228-9858(W)
</td></tr><tr><td valign="top" headers="&#xD;&#xA;              PIr01 &#xD;&#xA;              PIr11">&nbsp;&nbsp;<br />&nbsp;&nbsp;PORTLAND        , OR 97213     <br /><nobr>&nbsp;&nbsp;SID:
+                  </nobr><br /><nobr>&nbsp;&nbsp;Other Agency Numbers
+                </nobr><div style="padding-left: 15px;">99719 Multnomah County Sheriff</div></td></tr><tr height="25"><td colspan="5">&nbsp;</td></tr><tr><th class="ssTableHeader" valign="top" rowspan="2" id="PIr02">Plaintiff</th><th class="ssTableHeader" valign="top" id="PIr12">State of Oregon</th><td rowspan="2"></td><td rowspan="2" valign="top" headers="&#xD;&#xA;              PIr02 &#xD;&#xA;              PIr12"> </td><td rowspan="2" valign="top" headers="&#xD;&#xA;              PIr02 &#xD;&#xA;              PIr12 &#xD;&#xA;              PIc5&#xD;&#xA;            "><b></b><br />503 303-7238(W)</td></tr><tr><td valign="top" headers="&#xD;&#xA;              PIr02 &#xD;&#xA;              PIr12"></td></tr></table><table cellpadding="0" cellspacing="0" width="100%" border="0"><col width="2%" /><col width="40%" /><col width="15%" /><col width="15%" /><col width="15%" /><col width="10%" /><caption><div class="ssCaseDetailSectionTitle">Charge Information</div></caption><tr><th class="ssTableHeader" nowrap="true" colspan="2">
+              Charges: DOE, JOHN</th><th class="ssTableHeader"></th><th class="ssTableHeader">
+              Statute
+            </th><th class="ssTableHeader">
+              Level
+            </th><th class="ssTableHeader">
+              Date
+            </th></tr><tr><td valign="top">1.
+            &nbsp;</td><td valign="top">Poss Controlled Sub 2</td><td valign="top"></td><td valign="top">4759924B</td><td valign="top" nowrap="true">Felony Class C</td><td valign="top" nowrap="true">03/19/2000</td></tr><tr><td /><td></td></tr></table><table cellpadding="0" cellspacing="0" width="100%" border="0" style="table-layout:fixed;"><col width="54px" /><col width="3px" /><col width="3px" /><col width="700px" /><col width="100%" /><caption><div class="ssCaseDetailSectionTitle">Events &amp; Orders of the Court</div></caption><tr><td>&nbsp;</td><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><th id="CDisp" class="ssEventsAndOrdersSubTitle">DISPOSITIONS</th></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDCD1">05/10/2000</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td valign="top" headers="CDisp RCDCD1"><div style="padding-bottom: 10px"><b>Disposition</b> (Judicial Officer: Unassigned, Judge)<br /><div><div style="padding-left: 10px">1.&nbsp;Poss Controlled Sub 2<div style="padding-left: 40px">Convicted</div><div style="padding-left: 40px"></div></div></div><div style="padding-left: 10px;font-size:8pt;">
+        Created: 05/11/2000 12:00 AM</div></div></td></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDCD2">05/10/2000</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td valign="top" headers="CDisp RCDCD2"><div style="padding-bottom: 10px"><b>Plea</b> (Judicial Officer: Unassigned, Judge)<br /><div><div style="padding-left: 10px">1.&nbsp;Poss Controlled Sub 2<div style="padding-left: 40px">Guilty</div><div style="padding-left: 40px"></div></div></div><div style="padding-left: 10px;font-size:8pt;">
+        Created: 05/11/2000 12:00 AM</div></div></td></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDCD3">05/10/2000</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td valign="top" headers="CDisp RCDCD3"><div style="padding-bottom: 10px"><b>Judgment Presumptive</b> (Judicial Officer: Ro)<br /><div><div style="padding-left: 10px">1.&nbsp;Poss Controlled Sub 2<div style="padding-left: 40px"><table cellspacing="0px" cellpadding="0px" style="table-layout:fixed" width="100%"><tr><td class="ssMenuText ssSmallText"><nobr><table cellspacing="0px" cellpadding="0px" style="table-layout:fixed" width="90%"><colgroup><col width="20px" /><col width="*" /></colgroup><tr><td class="ssMenuText ssSmallText" colspan="2">Converted Disposition:</td></tr><tr><td /><td class="ssMenuText ssSmallText"><div class="ssPreFormatted ssMenuText ssSmallText" style="display:list-item;">Status: Superseded on: Feb 21 2001 12:00AM
+GRID 1E;PROB SUPV FEE $25/MO;90/30 CU IMPOSED;DP PER PO;</div></td></tr></table></nobr></td></tr></table><table cellspacing="0px" cellpadding="0px" style="table-layout:fixed" width="100%"><tr><td class="ssMenuText ssSmallText"><nobr><table cellspacing="0px" cellpadding="0px" style="table-layout:fixed" width="90%"><colgroup><col width="20px" /><col width="*" /></colgroup><tr><td class="ssMenuText ssSmallText" colspan="2">Converted Disposition:</td></tr><tr><td /><td class="ssMenuText ssSmallText"><div class="ssPreFormatted ssMenuText ssSmallText" style="display:list-item;">Status: Superseded on: Feb 21 2001 12:00AM
+Unitary Assessment $105.00       
+Attorney Fees $300.00       
+</div></td></tr></table></nobr></td></tr></table><table cellspacing="0px" cellpadding="0px" style="table-layout:fixed" width="100%"><tr><td class="ssMenuText ssSmallText"><nobr><table cellspacing="0px" cellpadding="0px" style="table-layout:fixed" width="90%"><colgroup><col width="20px" /><col width="*" /></colgroup><tr><td class="ssMenuText ssSmallText" colspan="2">Converted Disposition:</td></tr><tr><td /><td class="ssMenuText ssSmallText"><div class="ssPreFormatted ssMenuText ssSmallText" style="display:list-item;">Status: Superseded on: Feb 21 2001 12:00AM
+&amp;#x0A;Probation - Month(s): 18.00      
+General Conditions of Probation - : 
+Drug Package - : 
+No trespass - drug free zone - Year(s): 1.00       
+Drivers License Suspension - : Waived                                            
+State true name in all future police contacts - : 
+Remain Custody Units Available - : Reserved                                          
+Jail - Custody Units: 20.00      Credit Time Served                                
+Alternative terms may be considered (SB936) - : 
+</div></td></tr></table></nobr></td></tr></table></div></div></div><div style="padding-left: 10px;font-size:8pt;">
+        Created: 05/17/2000 12:00 AM</div></div></td></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDCD4">02/13/2001</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td valign="top" headers="CDisp RCDCD4"><div style="padding-bottom: 10px"><b>Amended Judgment on Probation</b> (Judicial Officer:) Reason: Supersedes Previous Judgment<br /><div><div style="padding-left: 10px">1.&nbsp;Poss Controlled Sub 2<div style="padding-left: 40px"><table cellspacing="0px" cellpadding="0px" style="table-layout:fixed" width="100%"><tr><td class="ssMenuText ssSmallText"><nobr><table cellspacing="0px" cellpadding="0px" style="table-layout:fixed" width="90%"><colgroup><col width="20px" /><col width="*" /></colgroup><tr><td class="ssMenuText ssSmallText" colspan="2">Converted Disposition:</td></tr><tr><td /><td class="ssMenuText ssSmallText"><div class="ssPreFormatted ssMenuText ssSmallText" style="display:list-item;">GRID 1E;PROB SUPV FEE $25/MO;90/30 CU IMPOSED;DP PER PO; ** Prob Cont d. No sanction **</div></td></tr></table></nobr></td></tr></table><table cellspacing="0px" cellpadding="0px" style="table-layout:fixed" width="100%"><tr><td class="ssMenuText ssSmallText"><nobr><table cellspacing="0px" cellpadding="0px" style="table-layout:fixed" width="90%"><colgroup><col width="20px" /><col width="*" /></colgroup><tr><td class="ssMenuText ssSmallText" colspan="2">Converted Disposition:</td></tr><tr><td /><td class="ssMenuText ssSmallText"><div class="ssPreFormatted ssMenuText ssSmallText" style="display:list-item;">Unitary Assessment $105.00       
+Attorney Fees $300.00       
+</div></td></tr></table></nobr></td></tr></table><table cellspacing="0px" cellpadding="0px" style="table-layout:fixed" width="100%"><tr><td class="ssMenuText ssSmallText"><nobr><table cellspacing="0px" cellpadding="0px" style="table-layout:fixed" width="90%"><colgroup><col width="20px" /><col width="*" /></colgroup><tr><td class="ssMenuText ssSmallText" colspan="2">Converted Disposition:</td></tr><tr><td /><td class="ssMenuText ssSmallText"><div class="ssPreFormatted ssMenuText ssSmallText" style="display:list-item;">Probation - Month(s): 18.00      
+General Conditions of Probation - : 
+Drug Package - : 
+No trespass - drug free zone - Year(s): 1.00       
+Drivers License Suspension - : Waived                                            
+State true name in all future police contacts - : 
+Remain Custody Units Available - : Reserved                                          
+Jail - Custody Units: 20.00      Credit Time Served                                
+Alternative terms may be considered (SB936) - : 
+Probation Continued - : 
+Original Conditions - : 
+</div></td></tr></table></nobr></td></tr></table></div></div></div><div style="padding-left: 10px;font-size:8pt;">
+        Created: 02/13/2001 12:00 AM</div></div></td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td></td></tr><tr><td>&nbsp;</td><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><th id="COtherEventsAndHearings" class="ssEventsAndOrdersSubTitle">OTHER EVENTS AND HEARINGS</th></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDER1">03/20/2000</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td headers="COtherEventsAndHearings RCDER1"><b>Arraignment</b><div style="padding-left: 10px;font-size:8pt;">
+            Created: 03/21/2000 12:00 AM</div></td></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDER2">03/20/2000</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td headers="COtherEventsAndHearings RCDER2"><b>Remove - Inactive Status</b><div style="padding-left: 10px;font-size:8pt;">
+            Created: 03/21/2000 12:00 AM</div></td></tr><tr><th class="ssTableHeaderLabel" valign="top" ID="RCDHR3">03/20/2000</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td headers="COtherEventsAndHearings RCDHR3"><b>Arraignment</b>&nbsp;
+            (2:30 PM)
+          
+    ()
+  <table></table><div style="padding-left: 10px;font-size:8pt;">
+              Created: 03/19/2000 12:00 AM</div></td></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDER4">03/21/2000</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td headers="COtherEventsAndHearings RCDER4"><b>Information</b><div style="padding-left: 10px;font-size:8pt;">
+            Created: 03/21/2000 12:00 AM</div></td></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDER5">03/21/2000</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td headers="COtherEventsAndHearings RCDER5"><b>Order - Probable Cause</b>
+            (Judicial Officer:
+            judicial officer
+            )
+          <div style="padding-left: 10px"><i>Comment: stamped on Information; 
+Court Action: Signed; Court Action Date: 03/20/2000; 
+Judge: Judge
+</i></div><div style="padding-left: 10px"><table cellpadding="0" cellspacing="0" border="0"><tr><th class="ssTableHeaderLabelLeft">Signed:&nbsp;&nbsp;</th><td>03/20/2000</td></tr></table></div><div style="padding-left: 10px;font-size:8pt;">
+            Created: 03/21/2000 12:00 AM</div></td></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDER6">03/22/2000</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td headers="COtherEventsAndHearings RCDER6"><b>Order - Appointing Counsel</b>
+            (Judicial Officer:
+            judicial officer
+            )
+          <div style="padding-left: 10px"><i>Court Action: Signed; Court Action Date: 03/20/2000; 
+Judge: Judge
+</i></div><div style="padding-left: 10px"><table cellpadding="0" cellspacing="0" border="0"><tr><th class="ssTableHeaderLabelLeft">Signed:&nbsp;&nbsp;</th><td>03/20/2000</td></tr></table></div><div style="padding-left: 10px;font-size:8pt;">
+            Created: 03/22/2000 12:00 AM</div></td></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDER7">03/22/2000</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td headers="COtherEventsAndHearings RCDER7"><b>Order - Appear</b>
+            (Judicial Officer:
+            judicial officer
+            )
+          <div style="padding-left: 10px"><i>Comment: PRSP IF ACCT W/PO APP; 
+Court Action: Signed; Court Action Date: 03/20/2000; 
+Judge: Judge
+</i></div><div style="padding-left: 10px"><table cellpadding="0" cellspacing="0" border="0"><tr><th class="
+            Created: 09/16/2008 12:00 AM</div></td></tr></table><table cellpadding="0" cellspacing="0" width="100%" border="0"><col width="1" /><col width="0" /><col width="3" /><col width="20%" /><col width="40%" /><col width="40%" /><col width="1" /><caption><div class="ssCaseDetailSectionTitle">Financial Information</div></caption><tr><td colspan="7"></td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td valign="top">&nbsp;</td><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><th class="ssTableHeaderLabelLeft" colspan="4" style="padding-left:3px" id="CDFRB1"><span style="font-weight: bold;">Defendant</span>&nbsp;DOE, JOHN</th></tr><tr><td>&nbsp;</td><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><th class="ssTableHeaderLabelLeft" colspan="3" style="padding-left:3px" id="RCDFRBFA1">Total Financial Assessment</th><td align="right" headers="CDFRB1 RCDFRBFA1">&nbsp;535.70</td></tr><tr><td>&nbsp;</td><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><th class="ssTableHeaderLabelLeft" colspan="3" style="padding-left:3px" id="RCDFRPC1">Total Payments and Credits</th><td align="right" headers="CDFRB1 RCDFRPC1">&nbsp;0.00</td></tr><tr><td>&nbsp;</td><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><th class="ssTableHeader" colspan="3" style="padding-left:3px" id="RCDFRBD1">
+          Balance Due as of 01/21/2019</th><td align="right" headers="CDFRB1 RCDFRBD1">&nbsp;<b>535.70</b></td></tr><tr><td>&nbsp;</td><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDFTRD1">05/17/2000</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><th class="ssTableHeaderLabelLeft" style="padding-left:3px" id="RCDFTRDE1">Transaction Assessment</th><td headers="CDFRB1 RCDFTRD1 RCDFTRDE1">&nbsp;</td><td headers="CDFRB1 RCDFTRD1 RCDFTRDE1">&nbsp;</td><td align="right" headers="CDFRB1 RCDFTRD1 RCDFTRDE1">&nbsp;105.00</td></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDFTRD2">05/17/2000</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><th class="ssTableHeaderLabelLeft" style="padding-left:3px" id="RCDFTRDE2">Transaction Assessment</th><td headers="CDFRB1 RCDFTRD2 RCDFTRDE2">&nbsp;</td><td headers="CDFRB1 RCDFTRD2 RCDFTRDE2">&nbsp;</td><td align="right" headers="CDFRB1 RCDFTRD2 RCDFTRDE2">&nbsp;300.00</td></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDFTRD3">07/24/2005</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><th class="ssTableHeaderLabelLeft" style="padding-left:3px" id="RCDFTRDE3">Transaction Assessment</th><td headers="CDFRB1 RCDFTRD3 RCDFTRDE3">&nbsp;</td><td headers="CDFRB1 RCDFTRD3 RCDFTRDE3">&nbsp;</td><td align="right" headers="CDFRB1 RCDFTRD3 RCDFTRDE3">&nbsp;61.00</td></tr><tr><th class="ssTableHeaderLabel" valign="top" id="RCDFTRD4">04/14/2011</th><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><th class="ssTableHeaderLabelLeft" style="padding-left:3px" id="RCDFTRDE4">Transaction Assessment</th><td headers="CDFRB1 RCDFTRD4 RCDFTRDE4">&nbsp;</td><td headers="CDFRB1 RCDFTRD4 RCDFTRDE4">&nbsp;</td><td align="right" headers="CDFRB1 RCDFTRD4 RCDFTRDE4">&nbsp;69.70</td></tr><tr><td>&nbsp;</td><td style="border-right: 1px solid black">&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></table>
+        <form id="Form1" action="" method="post"></form>
+   
+  </body>
+</html>
+    '''
diff --git a/src/backend/tests/parser/test_case_parser.py b/src/backend/tests/parser/test_case_parser.py
index ee0dbd29..81644bf6 100644
--- a/src/backend/tests/parser/test_case_parser.py
+++ b/src/backend/tests/parser/test_case_parser.py
@@ -11,9 +11,6 @@ class TestCaseWithDisposition(unittest.TestCase):
         self.parser = CaseParser()
         self.parser.feed(CaseDetails.CASE_X1)
 
-    def test_it_finds_the_start_of_each_table(self):
-        assert self.parser.current_table_number == 4
-
     # Tests charge data is collected for each row and column in the charge table
     # and is appended to the charge_table_data list grouped by rows.
     def test_it_parses_all_charge_rows(self):
@@ -105,9 +102,6 @@ class TestCaseWithoutFinancialTable(unittest.TestCase):
         self.parser = CaseParser()
         self.parser.feed(CaseDetails.CASE_WITHOUT_FINANCIAL_SECTION)
 
-    def test_it_finds_the_start_of_each_table(self):
-        assert self.parser.current_table_number == 3
-
     # Tests charge data is collected for each row and column in the charge table
     # and is appended to the charge_table_data list grouped by rows.
     def test_it_parses_all_charge_rows(self):
@@ -166,9 +160,6 @@ class TestCaseWithPartialDisposition(unittest.TestCase):
         self.parser = CaseParser()
         self.parser.feed(CaseDetails.CASE_WITH_PARTIAL_DISPOS)
 
-    def test_it_finds_the_start_of_each_table(self):
-        assert self.parser.current_table_number == 3
-
     # Tests charge data is collected for each row and column in the charge table
     # and is appended to the charge_table_data list grouped by rows.
     def test_it_parses_all_charge_rows(self):
@@ -256,9 +247,6 @@ class TestCaseWithoutDisposition(unittest.TestCase):
         self.parser = CaseParser()
         self.parser.feed(CaseDetails.CASE_WITHOUT_DISPOS)
 
-    def test_it_finds_the_start_of_each_table(self):
-        assert self.parser.current_table_number == 3
-
     # Tests charge data is collected for each row and column in the charge table
     # and is appended to the charge_table_data list grouped by rows.
     def test_it_parses_all_charge_rows(self):
@@ -334,9 +322,6 @@ class TestParkingViolationCase(unittest.TestCase):
         self.parser = CaseParser()
         self.parser.feed(CaseDetails.CASE_PARKING_VIOLATION)
 
-    def test_it_finds_the_start_of_each_table(self):
-        assert self.parser.current_table_number == 4
-
     # Tests charge data is collected for each row and column in the charge table
     # and is appended to the charge_table_data list grouped by rows.
     def test_it_parses_all_charge_rows(self):
@@ -383,3 +368,55 @@ class TestParkingViolationCase(unittest.TestCase):
         assert self.parser.hashed_charge_data[1]['statute'] == '16.20.430-A'
         assert self.parser.hashed_charge_data[1]['level'] == 'Violation Unclassified'
         assert self.parser.hashed_charge_data[1]['date'] == '12/01/2018'
+
+
+class TestCaseWithRelatedCases(unittest.TestCase):
+
+    def setUp(self):
+        self.parser = CaseParser()
+        self.parser.feed(CaseDetails.CASEJD74)
+
+    def test_ids_are_collected(self):
+        assert self.parser.charge_table_data[0] == '1.\\n            \\xa0'
+
+    def test_charge_names_are_collected(self):
+        assert self.parser.charge_table_data[1] == 'Poss Controlled Sub 2'
+
+    def test_statutes_are_collected(self):
+        assert self.parser.charge_table_data[2] == '4759924B'
+
+    def test_charge_levels_are_collected(self):
+        assert self.parser.charge_table_data[3] == 'Felony Class C'
+
+    def test_charge_dates_are_collected(self):
+        assert self.parser.charge_table_data[4] == '03/19/2000'
+
+    # Tests disposition data is collected from the events table
+    def test_it_parses_every_row_of_the_events_table(self):
+        assert len(self.parser.event_table_data) == 14
+
+    def test_it_collects_the_disposition_row(self):
+        dispo_count = 0
+        for data in self.parser.event_table_data:
+            if len(data) > 3 and data[3] == 'Disposition':
+                dispo_count += 1
+        assert dispo_count == 1
+
+    # Test relevant financial data is collected
+    def test_financial_data_is_parsed(self):
+        assert self.parser.balance_due == '535.70'
+
+    # Test data is formatted
+    def test_dispo_data_gets_formatted(self):
+        assert len(self.parser.hashed_dispo_data) == 1
+
+        assert self.parser.hashed_dispo_data[1]['ruling'] == 'Convicted'
+        assert self.parser.hashed_dispo_data[1]['date'] == '05/10/2000'
+
+    def test_charge_data_is_formatted(self):
+        assert len(self.parser.hashed_charge_data) == 1
+
+        assert self.parser.hashed_charge_data[1]['name'] == 'Poss Controlled Sub 2'
+        assert self.parser.hashed_charge_data[1]['statute'] == '4759924B'
+        assert self.parser.hashed_charge_data[1]['level'] == 'Felony Class C'
+        assert self.parser.hashed_charge_data[1]['date'] == '03/19/2000'