# -*- coding: utf-8 -*- 
from plumbing.models import *
from django.test import TestCase
from datetime import datetime
import pytz


class TestProcesses(TestCase):
	fixtures = [ 'initial_data.yaml', '*']

	def setUp(self):
		self.process = Process.objects.get(name='year.Mmonth')
		self.other_process = Process.objects.get(pk=6)
		self.stream = Stream(root_path="/var/service/data/GVAR_IMG/argentina/")

	def test_serialization(self):
		# check if the __str__ method is defined to return the class name with the name parameter.
		self.assertEquals(str(self.process), 'CollectTimed [year.Mmonth]')
		self.assertEquals(str(self.other_process), "FilterSolarElevation [Filter night's images]")

	def test_mark_with_tags(self):
		# check if the mark_with_tags method in the Process class don't
		# append a new tag into the stream.
		self.process.mark_with_tags(self.stream)
		self.assertTrue(self.stream.empty())
		self.other_process.mark_with_tags(self.stream)
		self.assertTrue(self.stream.empty())
@@ -321,16 +321,118 @@
 t(pk=6)%0A
+%09%09self.last_process = Process(name='Testing', description='This is a fake process only for testing.')%0A
 %09%09self.s
@@ -622,16 +622,124 @@
 ameter.%0A
+%09%09process = u'CollectTimed %5Byear.Mmonth%5D'%0A%09%09other_process = u%22FilterSolarElevation %5BFilter night's images%5D%22%0A
 %09%09self.a
@@ -773,36 +773,20 @@
 s), 
-'CollectTimed %5Byear.Mmonth%5D'
+str(process)
 )%0A%09%09
@@ -832,54 +832,239 @@
 s), 
-%22FilterSolarElevation %5BFilter night's images%5D%22
+str(other_process))%0A%09%09# check if the __unicode__ method is defined to return the class name with the name parameter.%0A%09%09self.assertEquals(unicode(self.process), process)%0A%09%09self.assertEquals(unicode(self.other_process), other_process
 )%0A%0A%09
@@ -1321,32 +1321,80 @@
 gs(self.stream)%0A
+%09%09self.last_process.mark_with_tags(self.stream)%0A
 %09%09self.assertTru

Complete test unit statements for Process (issue #10 and #13).