Guest User

Untitled

a guest
Feb 15th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import pytest
  2. from . import utilization
  3.  
  4. pytestmark = pytest.mark.django_db
  5. some_period = 'test'
  6.  
  7. @pytest.mark.django_db
  8. class TestUtilization(object):
  9. @classmethod
  10. def setup_class(self):
  11. self.period = some_period
  12. self.metric = utilization.Utilization(period=self.period)
  13. print('setup')
  14.  
  15. def test_get_query_params(self, tprint):
  16. """Should return dict with start/end keys of datetime values"""
  17. # assert self.xxx == some_period
  18. tprint(self.period)
  19. tprint(self.metric)
  20.  
  21. def test_call(self, tprint):
  22. """Test that we have desired fields and index of the metric"""
  23. pass
  24.  
  25. E Failed: Database access not allowed, use the "django_db"
  26. mark, or the "db" or "transactional_db" fixtures to enable it.
Add Comment
Please, Sign In to add comment