Skip to content

Commit

Permalink
Add test for LoadBalancerPoolNode.update
Browse files Browse the repository at this point in the history
  • Loading branch information
cyli committed Jan 8, 2015
1 parent 3675a38 commit 3fa375e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions mimic/test/test_rackconnect_v3.py
Expand Up @@ -67,6 +67,30 @@ def test_LBPoolNode_short_json(self):
},
self.pool.nodes[0].short_json())

def test_LBPoolNode_update(self):
"""
Updating the status changes the 'now', 'status', and 'status_detail'
attributes.
"""
self.pool.nodes[0].update(now="2000-01-02T00:00:00Z",
status="DISABLED",
status_detail="Broken.")
self.assertEqual(
{
"id": "node_0",
"created": "2000-01-01T00:00:00Z",
"updated": "2000-01-02T00:00:00Z",
"load_balancer_pool": {
"id": "pool_id"
},
"cloud_server": {
"id": "server_0"
},
"status": "DISABLED",
"status_detail": "Broken."
},
self.pool.nodes[0].short_json())

def test_LBPool_short_json(self):
"""
Valid JSON response (as would be displayed when listing pools or
Expand Down

0 comments on commit 3fa375e

Please sign in to comment.