Skip to content

Commit

Permalink
Remove test code
Browse files Browse the repository at this point in the history
  • Loading branch information
Taylor committed Jul 10, 2020
1 parent 0bb3f67 commit c0705ae
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions application.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ def _get_json_for_random_dates(count, use_concept_tags, thumbs):
random_date_ordinals = list(range(begin_ordinal, today_ordinal + 1))
shuffle(random_date_ordinals)

# FOR TESTING ONLY!
bad_ordinal = datetime(2020, 6, 10).toordinal()
random_date_ordinals = [bad_ordinal] + random_date_ordinals
assert random_date_ordinals[0] == 737586

all_data = []
for date_ordinal in random_date_ordinals:
dt = date.fromordinal(date_ordinal)
Expand All @@ -178,7 +173,7 @@ def _get_json_for_random_dates(count, use_concept_tags, thumbs):

data['service_version'] = SERVICE_VERSION
all_data.append(data)
if len(all_data) == count:
if len(all_data) >= count:
break

return jsonify(all_data)
Expand Down

0 comments on commit c0705ae

Please sign in to comment.