Exemplo n.º 1
0
 def test_get_all_location(self):
     view = LocationSiteList.as_view()
     request = self.factory.get('/api/location-site/')
     response = view(request)
     self.assertTrue(len(response.data) > 0)
Exemplo n.º 2
0
from bims.api_views.search import SearchObjects
from bims.api_views.validate_object import ValidateObject
from bims.api_views.get_biorecord import GetBioRecords
from bims.views.links import LinksCategoryView
from bims.views.activate_user import activate_user
from bims.views.csv_upload import CsvUploadView
from bims.views.shapefile_upload import ShapefileUploadView, process_shapefiles
from bims.views.under_development import UnderDevelopmentView
from bims.views.non_validated_list import NonValidatedObjectsView
from bims.views.collection_upload import CollectionUploadView

api_urls = [
    url(r'^api/location-type/(?P<pk>[0-9]+)/allowed-geometry/$',
        LocationTypeAllowedGeometryDetail.as_view()),
    url(r'^api/location-site/cluster/$', LocationSiteClusterList.as_view()),
    url(r'^api/location-site/$', LocationSiteList.as_view()),
    url(r'^api/location-site/(?P<pk>[0-9]+)/$',
        LocationSiteDetail.as_view(),
        name='location-site-detail'),
    url(r'^api/taxon/(?P<pk>[0-9]+)/$', TaxonDetail.as_view()),
    url(r'^api/cluster/(?P<administrative_level>\w+)/$',
        ClusterList.as_view()),
    url(r'^api/collection/extent/$', GetCollectionExtent.as_view()),
    url(r'^api/collection/cluster/$', ClusterCollection.as_view()),
    url(r'^api/collection/download/$', CollectionDownloader.as_view()),
    url(r'^collection/check_process/$', CollectionDownloader.as_view()),
    url(r'^api/search/$', SearchObjects.as_view(), name='search-api'),
    url(r'^api/list-collector/$',
        CollectorList.as_view(),
        name='list-collector'),
    url(r'^api/list-category/$',