예제 #1
0
def get_used_coverages_test():
    with app.test_request_context('/v1/coverage/fr-idf'):
        assert get_used_coverages() == ['fr-idf']

    with app.test_request_context('/v1/journeys'):
        register_used_coverages(['fr-bre'])
        assert get_used_coverages() == ['fr-bre']

    with app.test_request_context('/v1/journeys'):
        register_used_coverages('fr-bre')
        assert get_used_coverages() == ['fr-bre']
예제 #2
0
 def wrapper(*args, **kwargs):
     result = f(*args, **kwargs)
     region = getattr(self, 'region', None)
     if region:
         register_used_coverages([region])
     return result