# Path: devmason_server/models.py
# class Build(models.Model):
#     project = models.ForeignKey(Project, related_name='builds')
#     success = models.BooleanField()
#     started = models.DateTimeField()
#     finished = models.DateTimeField()
#     host = models.CharField(max_length=250)
#     arch = models.CharField(max_length=250)
#     user = models.ForeignKey(User, blank=True, null=True, related_name='builds')
#     extra_info = JSONField()
# 
#     class Meta:
#         ordering = ['-finished']
# 
#     def __unicode__(self):
#         return u"Build %s for %s" % (self.pk, self.project)
# 
#     @models.permalink
#     def get_absolute_url(self):
#         return ('build_detail', [self.project.slug, self.pk])
# 
# class Project(models.Model):
#     name = models.CharField(max_length=200)
#     slug = models.SlugField(unique=True)
#     owner = models.ForeignKey(User, related_name='projects', blank=True, null=True)
# 
#     class Meta:
#         ordering = ['name']
# 
#     def __unicode__(self):
#         return self.name
# 
#     @models.permalink
#     def get_absolute_url(self):
#         return ('project_detail', [self.slug])


import pprint
import difflib
from django.contrib.auth.models import User
from django.test import TestCase, Client
from django.utils import simplejson
from ..models import Build, Project
                    "rel": "tag-list"
                }
            ]
        }
    ],
    "builds": {
        "pony": {
            "success": True,
            "links": [
                {
                    "href": "/pony/builds/1",
                    "allowed_methods": [
                        "GET"
                    ],
                    "rel": "self"
                },
                {
                    "href": "/pony",
                    "allowed_methods": [
                        "GET",
                        "PUT",
                        "DELETE"
                    ],
                    "rel": "project"
                },
                {
                    "href": "/pony/tags/django",
                    "allowed_methods": [
                        "GET"
                    ],

# Path: devmason_server/models.py
# class Build(models.Model):
#     project = models.ForeignKey(Project, related_name='builds')
#     success = models.BooleanField()
#     started = models.DateTimeField()
#     finished = models.DateTimeField()
#     host = models.CharField(max_length=250)
#     arch = models.CharField(max_length=250)
#     user = models.ForeignKey(User, blank=True, null=True, related_name='builds')
#     extra_info = JSONField()
# 
#     class Meta:
#         ordering = ['-finished']
# 
#     def __unicode__(self):
#         return u"Build %s for %s" % (self.pk, self.project)
# 
#     @models.permalink
#     def get_absolute_url(self):
#         return ('build_detail', [self.project.slug, self.pk])
# 
# class Project(models.Model):
#     name = models.CharField(max_length=200)
#     slug = models.SlugField(unique=True)
#     owner = models.ForeignKey(User, related_name='projects', blank=True, null=True)
# 
#     class Meta:
#         ordering = ['name']
# 
#     def __unicode__(self):
#         return self.name
# 
#     @models.permalink
#     def get_absolute_url(self):
#         return ('project_detail', [self.slug])


# Path: devmason_server/tests/test_api.py
import pprint
import difflib
from django.contrib.auth.models import User
from django.test import TestCase, Client
from django.utils import simplejson
from ..models import Build, Project

                    "rel": "tag-list"
                }
            ]
        }
    ],
    "builds": {
        "pony": {
            "success": True,
            "links": [
                {
                    "href": "/pony/builds/1",
                    "allowed_methods": [
                        "GET"
                    ],
                    "rel": "self"
                },
                {
                    "href": "/pony",
                    "allowed_methods": [
                        "GET",
                        "PUT",
                        "DELETE"
                    ],
                    "rel": "project"
                },
                {
                    "href": "/pony/tags/django",
                    "allowed_methods": [
                        "GET"
                    ],

                    "rel": "tag"