blob: f4c846f2e70212455ad1e48480ab721182930bdf [file] [log] [blame]
import datetime
from django.core.files.storage import FileSystemStorage
from django.db import models
from django import forms
class TestRailTestRun(models.Model):
project_name = models.CharField(max_length=300, default="Mirantis Cloud Platform")
plan_name = models.CharField(max_length=300, default="[MCP2.0]OSCORE")
run_name = models.CharField(max_length=300, blank=True)
test_pattern = models.CharField(max_length=300, blank=True)
run_id = models.CharField(max_length=300)
created_by_id = models.IntegerField(default='109')
filter_func = models.TextField(null=True, blank=True)
ip_filter = models.BooleanField(default=True)
uuid_filter = models.BooleanField(default=True)
filter_last_traceback = models.BooleanField(default=False)
timestamp = models.DateField(default=datetime.date.today())
fs = FileSystemStorage()
class TestRailReport(models.Model):
path = models.FileField(storage=fs, null=True, blank=True, max_length=500)
test_run = models.ForeignKey(TestRailTestRun, on_delete=models.CASCADE)
report_name = models.CharField(max_length=300)
finished = models.BooleanField(default=False)
created_at = models.DateTimeField(auto_now_add=True)
class ActionLog(models.Model):
name = models.CharField(max_length=500)
date = models.DateTimeField(null=True)