# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0

""" Copyright 2012, 2013 UW Information Technology, University of Washington

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

from django.test import TestCase
from django.conf import settings
import random

from spotseeker_server.models import Spot
from django.test.utils import override_settings
from mock import patch
from spotseeker_server import models


@override_settings(
    SPOTSEEKER_AUTH_MODULE='spotseeker_server.auth.all_ok',
    SPOTSEEKER_SPOT_FORM='spotseeker_server.default_forms.spot.'
                         'DefaultSpotForm')
class SpotModelTest(TestCase):

    def test_json(self):
        name = "This is a test spot: {0}".format(random.random())

        spot = Spot()
        spot.name = name
        spot.save()

        saved_id = spot.pk

        test_spot = Spot.objects.get(pk=saved_id)
        json_data = test_spot.json_data_structure()

        self.assertEqual(json_data["name"], name)
        self.assertEqual(json_data["id"], saved_id)

@@ -85,647 +85,8 @@
 .0%0A%0A
-%22%22%22 Copyright 2012, 2013 UW Information Technology, University of Washington%0A%0A    Licensed under the Apache License, Version 2.0 (the %22License%22);%0A    you may not use this file except in compliance with the License.%0A    You may obtain a copy of the License at%0A%0A    http://www.apache.org/licenses/LICENSE-2.0%0A%0A    Unless required by applicable law or agreed to in writing, software%0A    distributed under the License is distributed on an %22AS IS%22 BASIS,%0A    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A    See the License for the specific language governing permissions and%0A    limitations under the License.%0A%22%22%22%0A%0A
 from
@@ -361,17 +361,17 @@
 _MODULE=
-'
+%22
 spotseek
@@ -391,17 +391,17 @@
 h.all_ok
-'
+%22
 ,%0A    SP
@@ -419,17 +419,17 @@
 OT_FORM=
-'
+%22
 spotseek
@@ -461,36 +461,15 @@
 pot.
-'
+%22
 %0A    
-                     '
+%22
 Defa
@@ -483,9 +483,11 @@
 Form
-'
+%22,%0A
 )%0Acl
@@ -515,17 +515,16 @@
 tCase):%0A
-%0A
     def 

Reformat and update copyright.