コード例 #1
0
    def test_datetime_2(self):
	# Test if date and time match for given crisis
	root = fromstring(open(os.path.join(settings.BASE_DIR, 'crisix/database/TestXML/TestLYCLWR.xml')).read())
        insert(root)
	a = Crisis.objects.get(id='CRI_LYCLWR')
	res = get_datetime(a)
	self.assertEqual(res, '2011-02-15')
コード例 #2
0
    def test_datetime_3(self):
	# Test if date and time are applicable to a non-crisis
	root = fromstring(open(os.path.join(settings.BASE_DIR, 'crisix/database/TestXML/TestBROBMA.xml')).read())
        insert(root)
	a = Person.objects.get(id='PER_BROBMA')
	res = get_datetime(a)
	self.assertEqual(res, '')
コード例 #3
0
    def test_datetime_1(self):
	# Test if date and time match for given crisis
	root = fromstring(open(os.path.join(settings.BASE_DIR, 'crisix/database/TestXML/TestSHESSG.xml')).read())
        insert(root)
	a = Crisis.objects.get(id='CRI_SHESSG')
	res = get_datetime(a)
	self.assertEqual(res, '2012-12-14, 09:35:00')