libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1072716 - /incubator/libcloud/trunk/test/test_ec2.py
Date Sun, 20 Feb 2011 20:29:06 GMT
Author: tomaz
Date: Sun Feb 20 20:29:05 2011
New Revision: 1072716

URL: http://svn.apache.org/viewvc?rev=1072716&view=rev
Log:
Tests for the ex_create_tags and ex_delete_tags function (EC2 driver).

Submitted By: Brandon Rhodes

Modified:
    incubator/libcloud/trunk/test/test_ec2.py

Modified: incubator/libcloud/trunk/test/test_ec2.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_ec2.py?rev=1072716&r1=1072715&r2=1072716&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_ec2.py (original)
+++ incubator/libcloud/trunk/test/test_ec2.py Sun Feb 20 20:29:05 2011
@@ -161,6 +161,14 @@ class EC2Tests(unittest.TestCase, TestCa
         self.assertTrue('owner' in tags)
         self.assertTrue('stack' in tags)
 
+    def test_ex_create_tags(self):
+        node = Node('i-4382922a', None, None, None, None, self.driver)
+        self.driver.ex_create_tags(node, {'sample': 'tag'})
+
+    def test_ex_delete_tags(self):
+        node = Node('i-4382922a', None, None, None, None, self.driver)
+        self.driver.ex_delete_tags(node, {'sample': 'tag'})
+
     def test_ex_describe_addresses_for_node(self):
         node1 = Node('i-4382922a', None, None, None, None, self.driver)
         ip_addresses1 = self.driver.ex_describe_addresses_for_node(node1)
@@ -233,6 +241,14 @@ class EC2MockHttp(MockHttp):
         body = self.fixtures.load('describe_tags.xml')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])
 
+    def _CreateTags(self, method, url, body, headers):
+        body = self.fixtures.load('create_tags.xml')
+        return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
+    def _DeleteTags(self, method, url, body, headers):
+        body = self.fixtures.load('delete_tags.xml')
+        return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
     def _DescribeAddresses(self, method, url, body, headers):
         body = self.fixtures.load('describe_addresses_multi.xml')
         return (httplib.OK, body, {}, httplib.responses[httplib.OK])



Mime
View raw message