# Path: tests/test_fields.py
# class ParentTest:
#     expected_status_code = 200
#     expected_return_payload = {}
# 
#     @property
#     def query(self):
#         raise NotImplementedError()
# 
#     def setUp(self):
#         self.user = factories.UserFactory()
#         self.client = Client()
#         self.response = self.client.query(self.query)
#         self.data = self.response.json()
# 
#     def test_should_return_expected_status_code(self):
#         self.assertEqual(self.response.status_code, self.expected_status_code)
# 
#     def test_should_return_expected_payload(self):
#         self.assertEqual(
#             self.response.json(), self.expected_return_payload, self.response.content
#         )


from django.test import TestCase
from tests.test_fields import ParentTest



class DateDirective_DateTime_Test(ParentTest, TestCase):
    query = """query { datetime @date(format:"HH:mm:ss YYYY.MM.DD") }"""
    expected_return_payload = {"data": {"datetime": "10:21:30 2020.12.31"}}



# Path: tests/test_fields.py
# class ParentTest:
#     expected_status_code = 200
#     expected_return_payload = {}
# 
#     @property
#     def query(self):
#         raise NotImplementedError()
# 
#     def setUp(self):
#         self.user = factories.UserFactory()
#         self.client = Client()
#         self.response = self.client.query(self.query)
#         self.data = self.response.json()
# 
#     def test_should_return_expected_status_code(self):
#         self.assertEqual(self.response.status_code, self.expected_status_code)
# 
#     def test_should_return_expected_payload(self):
#         self.assertEqual(
#             self.response.json(), self.expected_return_payload, self.response.content
#         )


# Path: tests/test_directives.py
from django.test import TestCase
from tests.test_fields import ParentTest




class DateDirective_DateTime_Test(ParentTest, TestCase):
    query = """query { datetime @date(format:"HH:mm:ss YYYY.MM.DD") }"""
    expected_return_payload = {"data": {"datetime": "10:21:30 2020.12.31"}}



class DateDirective_Time_Test(ParentTest, TestCase):