Test coverage report: ftp_deploy.models.log

# ftp_deploy.models.log: 19 total statements, 100.0% covered

Generated: Thu 2013-12-19 21:13 GMT

Source file: /var/www/service.dev/service/ftp_deploy/models/log.py

Stats: 15 executed, 0 missed, 4 excluded, 4 ignored

1. `import json`
2. `from django.db import models`
3. ``
4. `from ftp_deploy.utils.core import commits_parser`
5. `from .service import Service`
6. ``
7. `class Log(models.Model):`
8. `service = models.ForeignKey(Service, blank=True)`
9. `payload = models.TextField()`
10. `user = models.CharField(max_length=200)`
11. `status = models.BooleanField(default=False)`
12. `status_message = models.TextField(blank=True)`
13. `created = models.DateTimeField(auto_now_add=True)`
14. `skip = models.BooleanField(default=False)`
15. ``
16. `def commits_info(self):`
17. `commits = json.loads(self.payload)['commits']`
18. `return commits_parser(commits).commits_info()`
19. ``
20. `class Meta:`
21. `ordering = ('-created',)`
22. `app_label = 'ftp_deploy'`
23. `db_table = 'ftp_deploy_log'`