Repository: CybOXProject/python-cybox

Issue:
CIQ Address extension non mixboxified
I think the `cybox.extensions.location.ciq_address_3_0` module was left out of the mixboxification effort.

Discussion:

Patch:
diff --git a/cybox/bindings/extensions/location/ciq_address_3_0.py b/cybox/bindings/extensions/location/ciq_address_3_0.py
index ae0ad70..a148347 100644
--- a/cybox/bindings/extensions/location/ciq_address_3_0.py
+++ b/cybox/bindings/extensions/location/ciq_address_3_0.py
@@ -2,7 +2,9 @@
 # See LICENSE.txt for complete terms.
 
 import sys
-from cybox.bindings import *
+
+from mixbox.binding_utils import *
+
 import cybox.bindings.cybox_common as cybox_common
 
 XML_NS = "http://cybox.mitre.org/extensions/Address#CIQAddress3.0-1"


Test patch:
diff --git a/cybox/test/extensions/__init__.py b/cybox/test/extensions/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/cybox/test/extensions/location/__init__.py b/cybox/test/extensions/location/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/cybox/test/extensions/location/ciq_test.py b/cybox/test/extensions/location/ciq_test.py
new file mode 100644
index 0000000..a9d4318
--- /dev/null
+++ b/cybox/test/extensions/location/ciq_test.py
@@ -0,0 +1,26 @@
+# Copyright (c) 2015, The MITRE Corporation. All rights reserved.
+# See LICENSE.txt for complete terms.
+
+"""Tests for various encoding issues throughout the library"""
+
+import unittest
+
+from mixbox.vendor.six import StringIO
+
+from cybox.bindings.extensions.location import ciq_address_3_0
+
+
+class CIQAddressTests(unittest.TestCase):
+
+    def test_can_load_extension(self):
+        addr = ciq_address_3_0.CIQAddress3_0InstanceType()
+
+        # Really basic test to verify the extension works.
+        s = StringIO()
+        addr.export(s.write, 0)
+        xml = s.getvalue()
+        self.assertEqual(165, len(xml))
+
+
+if __name__ == "__main__":
+    unittest.main()