def METHOD_NAME(self):
    key1 = "some_key"
    write_stats(key1, 12)
    write_stats(key1, 13)
    self.assertEqual(MonitoringStats.query.filter_by(stats_key=key1).count(), 2)
    # Assert naive datetime
    self.assertEqual(MonitoringStats.query.filter_by(stats_key=key1).first().timestamp.tzinfo, None)
    # Now we write a new value, but with the parameter to delete old values
    write_stats(key1, 14, reset_values=True)
    # Since the sqlstats monitoring module handles the db in its own
    # session, we need to refresh the current session in order to retrieve
    # the updated (removed) data
    db.session.commit()
    self.assertEqual(MonitoringStats.query.filter_by(stats_key=key1).count(), 1)