<commit_before># -*- 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())<commit_msg>Complete test unit statements for Process (issue #10 and #13).<commit_after># -*- 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.last_process = Process(name='Testing', description='This is a fake process only for testing.')
		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.
		process = u'CollectTimed [year.Mmonth]'
		other_process = u"FilterSolarElevation [Filter night's images]"
		self.assertEquals(str(self.process), str(process))
		self.assertEquals(str(self.other_process), str(other_process))
		# check if the __unicode__ method is defined to return the class name with the name parameter.
		self.assertEquals(unicode(self.process), process)
		self.assertEquals(unicode(self.other_process), other_process)

	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.last_process.mark_with_tags(self.stream)
		self.assertTrue(self.stream.empty())
{'fraction_non_alphanumeric': 0.11349206349206349, 'fraction_numerical': 0.0031746031746031746, 'mean_word_length': 5.3025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6198350', 'n_tokens_mistral': 832, 'n_tokens_neox': 779, 'n_words': 197}