From a58da3edb33d893478114b274afb8f53ef26a807 Mon Sep 17 00:00:00 2001 From: Monica Date: Thu, 6 Oct 2016 23:30:38 -0400 Subject: [PATCH] added tests for getting most recent drones --- models/daasapp/tests/test_drones.py | 6 ++++++ web/daasapp/templates/web/lets-grade.html | 12 +++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/models/daasapp/tests/test_drones.py b/models/daasapp/tests/test_drones.py index 47566a6..79a90d0 100644 --- a/models/daasapp/tests/test_drones.py +++ b/models/daasapp/tests/test_drones.py @@ -47,6 +47,12 @@ def test2_Drone_Invalid_id(self): resp = json.loads(response.content.decode('utf8')) self.assertEquals(resp["ok"], False) + # Unit Test for User Story 6 + def test3_Most_Recent_Drones(self): + response = self.client.get(reverse('recent_drones')) + resp = json.loads(response.content.decode('utf8')) + print(str(resp) + "----------------------------") + self.assertEquals(len(list(resp['resp']['recent_things'])), 3) def tearDown(self): del self.client \ No newline at end of file diff --git a/web/daasapp/templates/web/lets-grade.html b/web/daasapp/templates/web/lets-grade.html index 9559a73..bf2b0af 100644 --- a/web/daasapp/templates/web/lets-grade.html +++ b/web/daasapp/templates/web/lets-grade.html @@ -33,14 +33,12 @@

User Stories

  • Unit Tests

    -

    1. See code that creates user profile using UserForm.

    -

    2. See code that inspects users and gets user attributes.

    +

    1. See code that creates user profile using UserForm.

    +

    2. See code that inspects users and gets user attributes.

    3. See code that creates drones, gets drone attributes and tests invalid drone ids.

    -

    4. See code that inspects biography.

    -

    5. See code that inspects when the user signed up.

    - - - +

    4. See code that inspects biography.

    +

    5. See code that inspects when the user signed up.

    +

    6. See code that tests 3 most recent drones available.