Skip to content

Commit

Permalink
Started adding unit tests to Aristotle
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Nelson committed Feb 11, 2012
1 parent 6b34ee2 commit 6db9ad3
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 79 deletions.
5 changes: 2 additions & 3 deletions aristotle/apps/datasets/tests.py
Expand Up @@ -5,10 +5,9 @@
Replace this with more appropriate tests for your application.
"""

from django.test import TestCase
import unittest


class SimpleTest(TestCase):
class SimpleTest(unittest.TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
Expand Down
16 changes: 16 additions & 0 deletions aristotle/apps/discovery/tests.py
@@ -0,0 +1,16 @@
"""
:mods:`tests` Unit tests for discovery functionality in Aristotle
"""
__author__ = 'Jeremy Nelson'
import unittest
from django.test.client import Client

class TestSearch(unittest.TestCase):

def setUp(self):
self.client = Client()


def test_default(self):
response = c.get('/')
self.assertEquals(response.status_code,'200')
10 changes: 5 additions & 5 deletions aristotle/apps/grx/tests.py
Expand Up @@ -4,12 +4,12 @@
(c) 2011 Colorado College
"""
__author__ = 'Jeremy Nelson'
import grx.settings as grx
from django.test import TestCase
from grx.bots.grxbots import GoldRushBot
from grx.bots.solrbots import SolrBot
import settings as grx
import unittest
from bots.grxbots import GoldRushBot
from bots.solrbots import SolrBot

class SetupTest(TestCase):
class SetupTest(unittest.TestCase):

def setUp(self):
# Default bots used in this app
Expand Down
4 changes: 2 additions & 2 deletions aristotle/apps/marc/bots/tests.py
Expand Up @@ -13,7 +13,7 @@


def validate300b(raw_string):
good_300b = '%s, %s' % ('digital',digital_re.sub('',raw_string)
good_300b = '%s, %s' % ('digital',digital_re.sub('',raw_string))
last_char = good_300b[-1]
if last_char == '+':
if good_300b[-3] == ',':
Expand All @@ -23,6 +23,6 @@ def validate300b(raw_string):
elif last_char == ',':
good_300b = good_300b[:-1]
if good_300b[-1] != '.':
good_300b = good_300b += '.'
good_300b += '.'
return good_300b

5 changes: 2 additions & 3 deletions aristotle/apps/marc/tests.py
Expand Up @@ -5,10 +5,9 @@
Replace this with more appropriate tests for your application.
"""

from django.test import TestCase
import unittest


class SimpleTest(TestCase):
class SimpleTest(unittest.TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
Expand Down
5 changes: 2 additions & 3 deletions aristotle/apps/repository/tests.py
Expand Up @@ -5,10 +5,9 @@
Replace this with more appropriate tests for your application.
"""

from django.test import TestCase
import unittest


class SimpleTest(TestCase):
class SimpleTest(unittest.TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
Expand Down
5 changes: 2 additions & 3 deletions aristotle/apps/schema_org/tests.py
Expand Up @@ -5,10 +5,9 @@
Replace this with more appropriate tests for your application.
"""

from django.test import TestCase
import unittest


class SimpleTest(TestCase):
class SimpleTest(unittest.TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
Expand Down
5 changes: 2 additions & 3 deletions aristotle/apps/vendors/ebsco/tests.py
Expand Up @@ -5,10 +5,9 @@
Replace this with more appropriate tests for your application.
"""

from django.test import TestCase
import unittest


class SimpleTest(TestCase):
class SimpleTest(unittest.TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
Expand Down
9 changes: 4 additions & 5 deletions aristotle/apps/vendors/iii/tests.py
Expand Up @@ -4,13 +4,12 @@
Replace this with more appropriate tests for your application.
"""
import unittest
from settings import *

from django.test import TestCase
from vendors.iii.settings import *

class ConfigurationTest(TestCase):
class ConfigurationTest(unittest.TestCase):

def test_opac_settings(self):
self.assertEquals(OPAC_URL,
'http://tiger.coloradocollege.edu')
'http://tiger.coloradocollege.edu/xrecord=')

5 changes: 2 additions & 3 deletions aristotle/apps/vendors/oclc/tests.py
Expand Up @@ -5,10 +5,9 @@
Replace this with more appropriate tests for your application.
"""

from django.test import TestCase
import unittest


class SimpleTest(TestCase):
class SimpleTest(unittest.TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
Expand Down
5 changes: 2 additions & 3 deletions aristotle/apps/vendors/refworks/tests.py
Expand Up @@ -5,10 +5,9 @@
Replace this with more appropriate tests for your application.
"""

from django.test import TestCase
import unittest


class SimpleTest(TestCase):
class SimpleTest(unittest.TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
Expand Down
4 changes: 2 additions & 2 deletions aristotle/apps/vendors/tests.py
Expand Up @@ -5,10 +5,10 @@
Replace this with more appropriate tests for your application.
"""

from django.test import TestCase
import unittest


class SimpleTest(TestCase):
class SimpleTest(unittest.TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
Expand Down
4 changes: 2 additions & 2 deletions aristotle/apps/vendors/whitewhale/tests.py
Expand Up @@ -5,10 +5,10 @@
Replace this with more appropriate tests for your application.
"""

from django.test import TestCase
import unittest


class SimpleTest(TestCase):
class SimpleTest(unittest.TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
Expand Down
33 changes: 33 additions & 0 deletions aristotle/templates/404.html
@@ -0,0 +1,33 @@
{% extends 'cc-search-base.html' %}

{% block search-title %}Tutt Library Discovery Services 404 Page Not Found • Colorado College{% endblock %}

{% block more-css %}
{% endblock %}

{% block search-panel %}
{% endblock %}

{% block search-facets %}
{% endblock %}

{% block results-detail %}
{% endblock %}

{% block results-list %}
<div class="main">
<div class="results-list discovery-service">
<h1>Sorry! 404 Error</h1>
<div class="discovery-home">
<h2 class="discovery-home">Please contact the library if you continue to have pproblems</h2>
<p> We couldn't find this resource
</p>
<span class="clear"></span>
</div>
</div>
</div>
<span class="clear"></span>
{% endblock %}

{% block more-scripts %}
{% endblock more-scripts %}
42 changes: 0 additions & 42 deletions aristotle/tests/test_notification_templates.py

This file was deleted.

0 comments on commit 6db9ad3

Please sign in to comment.