• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gcivil-nyu-org / fall24-monday-team4 / 437

16 Dec 2024 08:19PM UTC coverage: 96.872% (-3.0%) from 99.892%
437

Pull #171

travis-pro

web-flow
Merge pull request #170 from gcivil-nyu-org/all_branch_merge

Develop V6.1.2
Pull Request #171: Production V2

153 of 230 new or added lines in 14 files covered. (66.52%)

17 existing lines in 4 files now uncovered.

3004 of 3101 relevant lines covered (96.87%)

0.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.12
/routepals/views.py
1
from django.shortcuts import redirect
1✔
2
from django.views.generic import TemplateView
1✔
3
from locations.models import Trip
1✔
4
from django.http import HttpResponse
1✔
5

6

7
class HomeView(TemplateView):
1✔
8
    template_name = "home.html"
1✔
9

10
    def get(self, request, *args, **kwargs):
1✔
11
        if (
1✔
12
            request.user.is_authenticated
13
            and request.user.userprofile.is_verified
14
            and request.user.userprofile.is_emergency_support
15
        ):
16
            return redirect("emergency_support")
1✔
17
        return super().get(request, *args, **kwargs)
1✔
18

19
    def get_context_data(self, **kwargs):
1✔
20
        context = super().get_context_data(**kwargs)
1✔
21
        if self.request.user.is_authenticated:
1✔
22
            context["has_active_trip"] = Trip.objects.filter(
1✔
23
                user=self.request.user,
24
                status__in=["SEARCHING", "MATCHED", "READY", "IN_PROGRESS"],
25
            ).exists()
26
        return context
1✔
27

28

29
def health_check(request):
1✔
NEW
30
    return HttpResponse(status=200)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc