Fixed Test Cases
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 5902c68..4b8aa15 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -539,7 +539,8 @@
 			"attribute_value": args[d]
 		})
 	variant.set("attributes", variant_attributes)
-	copy_attributes_to_variant(item, variant)
+	template = frappe.get_doc("Item", item)
+	copy_attributes_to_variant(template, variant)
 	return variant
 	
 def copy_attributes_to_variant(item, variant):
diff --git a/erpnext/stock/doctype/item/test_item.py b/erpnext/stock/doctype/item/test_item.py
index 9235bec..8db2d2d 100644
--- a/erpnext/stock/doctype/item/test_item.py
+++ b/erpnext/stock/doctype/item/test_item.py
@@ -6,7 +6,7 @@
 import frappe
 
 from frappe.test_runner import make_test_records
-from erpnext.stock.doctype.item.item import WarehouseNotSet, ItemTemplateCannotHaveStock
+from erpnext.stock.doctype.item.item import WarehouseNotSet, ItemTemplateCannotHaveStock, create_variant
 from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry
 
 test_ignore = ["BOM"]
@@ -98,5 +98,12 @@
 
 		for key, value in to_check.iteritems():
 			self.assertEquals(value, details.get(key))
+		
+	def test_make_item_variant(self):
+		if not frappe.db.exists("Item", "_Test Variant Item-S"):
+			variant = create_variant("_Test Variant Item", """{"Test Size": "Small"}""")
+			variant.item_code = "_Test Variant Item-S"
+			variant.item_name = "_Test Variant Item-S"
+			variant.save()
 
 test_records = frappe.get_test_records('Item')
diff --git a/erpnext/stock/doctype/item/test_records.json b/erpnext/stock/doctype/item/test_records.json
index 5dd63e3..f12c7cc 100644
--- a/erpnext/stock/doctype/item/test_records.json
+++ b/erpnext/stock/doctype/item/test_records.json
@@ -273,6 +273,11 @@
   "item_name": "_Test Variant Item",
   "stock_uom": "_Test UOM",
   "has_variants": 1,
+  "attributes": [
+	  {
+	  	"attribute": "Test Size"
+	  }
+  ],
   "apply_warehouse_wise_reorder_level": 1,
   "reorder_levels": [
       {
diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py
index 03a2ffe..29f2a21 100644
--- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py
@@ -67,6 +67,9 @@
 
 	def test_auto_material_request(self):
 		self._test_auto_material_request("_Test Item")
+		
+	def test_auto_material_request_for_variant(self):
+		self._test_auto_material_request("_Test Variant Item-S")
 
 	def _test_auto_material_request(self, item_code):
 		item = frappe.get_doc("Item", item_code)