def test_import_simple2(self):
		from django.core.files import File
		self.normal_file2()
		f=open(os.path.dirname(os.path.abspath(__file__))+'/test2.csv', 'r')
		aTest = File(f)
		self.assertTrue(handle_uploaded_planning(aTest))
		self.assertEqual(24, len(planning.objects.all()))
		os.remove(os.path.dirname(os.path.abspath(__file__))+'/test2.csv')
Exemple #2
0
	def save(self, *args, **kwargs):
		return handle_uploaded_planning(kwargs['file'])