1
0
mirror of https://github.com/django/django.git synced 2025-01-03 15:06:09 +00:00

Refs #30489 -- Fixed RasterFieldTest.test_deserialize_with_pixeltype_flags() when run without numpy.

This commit is contained in:
Mariusz Felisiak 2020-03-07 21:34:33 +01:00
parent a3917c323f
commit 9358da704e

View File

@ -68,7 +68,10 @@ class RasterFieldTest(TransactionTestCase):
rast=Func(F('rast'), function='ST_SetBandIsNoData'),
)
r.refresh_from_db()
self.assertEqual(r.rast.bands[0].data(), [[no_data]])
band = r.rast.bands[0].data()
if numpy:
band = band.flatten().tolist()
self.assertEqual(band, [no_data])
self.assertEqual(r.rast.bands[0].nodata_value, no_data)
def test_model_creation(self):