Example #1
0
 def test_basic(self):
     # A very simple test.  Only tests that the hash function exists and 
     # returns the same hash value when given the same input.
     
     from linkanalytics.models import _create_uuid
     i = _create_uuid()
     s = 'This is some data to be hashed.'
     
     a = urlex.generate_urlhash(i,s)
     b = urlex.generate_urlhash(i,s)
     
     self.assertEquals(a, b)
Example #2
0
def _create_tracker_for_email():
    """Creates a Tracker to be used with a new email message."""
    fmt = app_settings.EMAIL_TRACKER_NAMEFORMAT
    u = Tracker(name=fmt.format(_create_uuid()))
    u.save()
    return u