Skip to content

Commit

Permalink
added tests for getting most recent drones
Browse files Browse the repository at this point in the history
  • Loading branch information
mdk6jd committed Oct 7, 2016
1 parent 72ac996 commit a58da3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 6 additions & 0 deletions models/daasapp/tests/test_drones.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 5 additions & 7 deletions web/daasapp/templates/web/lets-grade.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ <h3 class="list-group-item-heading">User Stories</h3>
<li class="list-group-item list-group-item-warning">
<h3 class="list-group-item-heading">Unit Tests</h3>
<p class="list-group-item-text">
<p> 1. <a href = "https://github.com/samuelhavron/daas/blob/master/models/daasapp/tests/test_users.py#L13-L23"> See code that creates user profile using UserForm. </a> </p>
<p> 2. <a href = "https://github.com/samuelhavron/daas/blob/master/models/daasapp/tests/test_users.py#L26-L65"> See code that inspects users and gets user attributes. </a> </p>
<p> 1. <a href = "https://github.com/samuelhavron/daas/blob/master/models/daasapp/tests/test_users.py#L14-L24"> See code that creates user profile using UserForm. </a> </p>
<p> 2. <a href = "https://github.com/samuelhavron/daas/blob/master/models/daasapp/tests/test_users.py#L27-L68"> See code that inspects users and gets user attributes. </a> </p>
<p> 3. <a href = "https://github.com/samuelhavron/daas/blob/master/models/daasapp/tests/test_drones.py#L10-L52"> See code that creates drones, gets drone attributes and tests invalid drone ids. </a> </p>
<p> 4. <a href = "" > See code that inspects biography. </a> </p>
<p> 5. <a href = "" > See code that inspects when the user signed up. </a> </p>



<p> 4. <a href = "https://github.com/samuelhavron/daas/blob/master/models/daasapp/tests/test_users.py#L53-L54" > See code that inspects biography. </a> </p>
<p> 5. <a href = "https://github.com/samuelhavron/daas/blob/master/models/daasapp/tests/test_users.py#L55-L57" > See code that inspects when the user signed up. </a> </p>
<p> 6. <a href = "https://github.com/samuelhavron/daas/blob/master/models/daasapp/tests/test_drones.py#L50-L55" > See code that tests 3 most recent drones available. </a> </p>
</p>
</li>

Expand Down

0 comments on commit a58da3e

Please sign in to comment.