mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 15:02:01 +08:00
python3-drf-nested-routers: update to 0.95.0; add test.sh
Add PYPI_SOURCE_NAME:=drf_nested_routers as the 0.95.0 sdist uses underscores in the filename. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
committed by
Alexandru Ardelean
parent
aa318c2850
commit
0f833b1b9c
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$1" = python3-drf-nested-routers ] || exit 0
|
||||
|
||||
python3 - << 'EOF'
|
||||
import django
|
||||
from django.conf import settings
|
||||
settings.configure(
|
||||
INSTALLED_APPS=['rest_framework'],
|
||||
DATABASES={},
|
||||
)
|
||||
|
||||
from rest_framework_nested import routers
|
||||
|
||||
router = routers.SimpleRouter()
|
||||
assert router is not None
|
||||
|
||||
# Verify NestedSimpleRouter is importable
|
||||
from rest_framework_nested.routers import NestedSimpleRouter
|
||||
assert NestedSimpleRouter is not None
|
||||
|
||||
print("python3-drf-nested-routers OK")
|
||||
EOF
|
||||
Reference in New Issue
Block a user