mirror of
https://github.com/daniviga/bite.git
synced 2025-04-20 14:31:20 +02:00
Add flake8 testing
This commit is contained in:
parent
94a3a08d52
commit
e85d0bf5bd
@ -48,3 +48,8 @@ jobs:
|
|||||||
env: IOT_TL=mqtt
|
env: IOT_TL=mqtt
|
||||||
- <<: *iot-simulator
|
- <<: *iot-simulator
|
||||||
env: IOT_TL=ws
|
env: IOT_TL=ws
|
||||||
|
- stage: python
|
||||||
|
install:
|
||||||
|
- pip3 -q install flake8
|
||||||
|
script:
|
||||||
|
- flake8 bite --exclude migrations,settings.py
|
||||||
|
@ -26,16 +26,3 @@ from api.serializers import DeviceSerializer
|
|||||||
class APISubscribe(ModelViewSet):
|
class APISubscribe(ModelViewSet):
|
||||||
queryset = Device.objects.all()
|
queryset = Device.objects.all()
|
||||||
serializer_class = DeviceSerializer
|
serializer_class = DeviceSerializer
|
||||||
|
|
||||||
# def post(self, request):
|
|
||||||
# serializer = DeviceSerializer(data=request.data)
|
|
||||||
# if serializer.is_valid():
|
|
||||||
# serializer.save()
|
|
||||||
# return Response(serializer.data, status=status.HTTP_201_CREATED)
|
|
||||||
# return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
|
||||||
|
|
||||||
# def get(self, request):
|
|
||||||
# devices = Device.objects.all()
|
|
||||||
# import pdb; pdb.set_trace()
|
|
||||||
# serializer = DeviceSerializer(devices)
|
|
||||||
# return Response(serializer.serial)
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
from rest_framework.views import APIView
|
from rest_framework.views import APIView
|
||||||
from rest_framework.viewsets import ModelViewSet
|
from rest_framework.viewsets import ModelViewSet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user