+ def get_all_records_where(self, condition):
+ k, v = re.match(r'field "([^"]*)"="([^"]*)"$', condition).groups()
+ d = {}
+
+ # I'm sure that the keys used in the dictionary below are wrong
+ # but I can't find any documentation on get_all_records_where
+ # and this satisfies the current test case.
+ i = 0
+ for rec in self.records:
+ if rec[k] == v:
+ d[i] = rec
+ i += 1
+ return d
+