working NK sync tests
This commit is contained in:
@@ -10,6 +10,8 @@ import pandas as pd
|
||||
nu = datetime.datetime.now()
|
||||
from rowers import tasks
|
||||
|
||||
import rowers.courses as courses
|
||||
|
||||
|
||||
class fakejob:
|
||||
def __init__(self):
|
||||
@@ -53,6 +55,15 @@ class AsyncTaskTests(TestCase):
|
||||
workouttype = 'water',
|
||||
)
|
||||
|
||||
cs = courses.kmltocourse('rowers/tests/testdata/thyro.kml')
|
||||
course = cs[0]
|
||||
cname = course['name']
|
||||
cnotes = course['description']
|
||||
polygons = course['polygons']
|
||||
self.ThyroBaantje = courses.createcourse(self.r,cname,polygons,notes=cnotes)
|
||||
self.ThyroBaantje.save()
|
||||
|
||||
|
||||
def tearDown(self):
|
||||
for workout in self.user_workouts:
|
||||
try:
|
||||
@@ -68,6 +79,13 @@ class AsyncTaskTests(TestCase):
|
||||
except:
|
||||
pass
|
||||
|
||||
def test_polygons(self):
|
||||
polygons = GeoPolygon.objects.all()
|
||||
polygon = polygons[0]
|
||||
obj = (polygon.id,polygon.name)
|
||||
path = tasks.polygon_to_path(obj)
|
||||
self.assertEqual(len(path),4)
|
||||
|
||||
def test_summaryfromsplitdata(self):
|
||||
splitdata = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user