def test_get_user_ids_by_last_modified(self): start = datetime.utcnow() - timedelta(days=3) end = datetime.utcnow() + timedelta(days=3) self.assertEqual( set(get_user_ids_by_last_modified(start, end)), {self.web_user._id, self.commcare_user._id}, ) self.assertEqual( set(get_user_ids_by_last_modified(start, end - timedelta(days=4))), set(), )
def record_iter(cls, start_datetime, end_datetime): user_ids = get_user_ids_by_last_modified(start_datetime, end_datetime) return iter_docs(CouchUser.get_db(), user_ids)
def record_iter(cls, start_datetime, end_datetime): user_ids = get_user_ids_by_last_modified(start_datetime, end_datetime) return iter_docs(CouchUser.get_db(), user_ids)