Commit 46c66b42 authored by Niklas Selke's avatar Niklas Selke
Browse files

modified the population density service

parent f61c90c5
Pipeline #97126 passed with stages
in 49 seconds
......@@ -18,7 +18,7 @@ class TestSerializers(TestCase):
('mean', 10),
])
serializer = AggSerializer(rawdata)
self.assertEqual(serializer.instance["unit"], 'kg m-2 s-1')
self.assertEqual(serializer.instance["unit"], "kg m-2 s-1")
self.assertEqual(serializer.instance["radius"], 5000)
......
"""serializer for population density data
"""
from collections import OrderedDict
import datetime as dt
from utils.agg_serializer import GeneralAggSerializer
......
import geo_location_services.settings as settings
from django.test import TestCase
from services.population_number.serializers import AggSerializer
from services.population_density.views import PopulationDensityView
import geo_location_services.settings as settings
from collections import OrderedDict
......@@ -18,7 +18,7 @@ class TestSerializers(TestCase):
('mean', 10),
])
serializer = AggSerializer(rawdata)
self.assertEqual(serializer.instance["unit"], '')
self.assertEqual(serializer.instance["unit"], "")
self.assertEqual(serializer.instance["radius"], 5000)
......@@ -26,7 +26,7 @@ class TestViews(TestCase):
def test_PopulationDensityView(self):
view = PopulationDensityView()
self.assertEqual(view.min_valid, 0)
self.assertEqual(view.min_valid, 0.)
self.assertEqual(view.max_valid, 2.e9)
self.assertTrue(view.AggSerializer is AggSerializer)
self.assertListEqual(view.AGG_ALLOWED, ['mean', 'min', 'max', 'median', 'percentile', 'sum', 'stddev'])
import math
# from geo_location_services.settings import DEBUG, USE_LOCAL_DATA, USE_SMALL_DATA
# from services.file_extractions.population_density_file_extraction import read_proxydata
from services.population_number.views import PopulationNumberView
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment