-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
149 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('statsy', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='statsyobject', | ||
options={'ordering': ('-created_at',), 'verbose_name': 'Statsy Object', 'verbose_name_plural': 'Statsy Objects', 'permissions': (('stats_view', 'Can view stats'),)}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# coding: utf-8 | ||
|
||
from django.test import TestCase | ||
|
||
import statsy | ||
|
||
|
||
class LogTest(TestCase): | ||
def test_log(self): | ||
statsy.logger.info('INFO message') | ||
statsy.logger.error('Error message') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# coding: utf-8 | ||
|
||
from django.test import TestCase | ||
|
||
import statsy | ||
|
||
from tests.settings import test_group, test_event, test_label, test_value_list | ||
|
||
|
||
class ModelsUnicodeTest(TestCase): | ||
def setUp(self): | ||
self.statsy = statsy.Statsy(cache=False) | ||
|
||
for test_value in test_value_list: | ||
self.statsy.send( | ||
group=test_group, event=test_event, | ||
label=test_label, value=test_value | ||
) | ||
|
||
def test_models_unicode(self): | ||
for stats in self.statsy.objects.all(): | ||
self.assertIsInstance(str(stats), str) | ||
self.assertIsInstance(str(stats.group), str) | ||
self.assertIsInstance(str(stats.event), str) |