示例#1
0
    def setUp(self):
        datetime_now = datetime.datetime(2024, 1, 1, 0, 00)
        datetime_now = pytz.timezone("UTC").localize(datetime_now, is_dst=None)
        start_date = (datetime_now -
                      datetime.timedelta(days=30)).date().__str__()
        end_date_first_task = (datetime_now +
                               datetime.timedelta(days=30)).date().__str__()
        end_date_second_task = (datetime_now +
                                datetime.timedelta(days=60)).date().__str__()

        self.test_billing_cycle = StandardCustomerBillingCycleFactory.create()
        self.test_user = AdminUserFactory.create()
        self.test_customer_group = StandardCustomerGroupFactory.create()
        self.test_customer = StandardCustomerFactory.create(
            is_member_of=(self.test_customer_group, ))
        self.test_currency = StandardCurrencyFactory.create()
        self.test_user_extension = StandardUserExtensionFactory.create(
            user=self.test_user)
        self.test_reporting_period = StandardReportingPeriodFactory.create()
        self.test_1st_task = StandardTaskFactory.create(
            title="1st Test Task",
            planned_start_date=start_date,
            planned_end_date=end_date_first_task,
            project=self.test_reporting_period.project,
            last_status_change=datetime.date(2024, 6, 15))
        self.test_2nd_task = StandardTaskFactory.create(
            title="2nd Test Task",
            planned_start_date=start_date,
            planned_end_date=end_date_second_task,
            project=self.test_reporting_period.project,
            last_status_change=datetime.date(2024, 6, 15))
    def setUp(self):
        datetime_now = make_date_utc(datetime.datetime(2024, 1, 1, 0, 00))
        start_date = (datetime_now - datetime.timedelta(days=30)).date()
        end_date_first_task = (datetime_now + datetime.timedelta(days=30)).date()
        end_date_second_task = (datetime_now + datetime.timedelta(days=60)).date()

        self.test_billing_cycle = StandardCustomerBillingCycleFactory.create()
        self.test_user = AdminUserFactory.create()
        self.test_customer_group = StandardCustomerGroupFactory.create()
        self.test_unit = StandardUnitFactory.create()
        self.test_customer = StandardCustomerFactory.create(is_member_of=(self.test_customer_group,))
        self.test_currency = StandardCurrencyFactory.create()
        self.test_user_extension = StandardUserExtensionFactory.create(user=self.test_user)
        self.test_reporting_period = StandardReportingPeriodFactory.create()
        self.test_human_resource = StandardHumanResourceFactory.create()
        self.resource_price = StandardResourcePriceFactory.create(
            resource=self.test_human_resource,
            unit=self.test_unit,
            currency=self.test_currency,
            customer_group=self.test_customer_group,
            price="120",
        )
        self.test_1st_task = StandardTaskFactory.create(title="1st Test Task",
                                                        project=self.test_reporting_period.project)
        self.estimation_1st_task = StandardHumanResourceEstimationToTaskFactory(task=self.test_1st_task,
                                                                                date_from=start_date,
                                                                                date_until=end_date_first_task,
                                                                                amount=0)
        self.test_2nd_task = StandardTaskFactory.create(title="2nd Test Task",
                                                        project=self.test_reporting_period.project)
        self.estimation_2nd_task = StandardHumanResourceEstimationToTaskFactory(task=self.test_2nd_task,
                                                                                date_from=start_date,
                                                                                date_until=end_date_second_task,
                                                                                amount=0)
示例#3
0
    def setUp(self):
        datetime_now = make_date_utc(datetime.datetime(2024, 1, 1, 0, 00))
        start_date = (datetime_now - datetime.timedelta(days=30)).date()
        end_date_first_task = (datetime_now +
                               datetime.timedelta(days=30)).date()
        end_date_second_task = (datetime_now +
                                datetime.timedelta(days=60)).date()

        self.test_billing_cycle = StandardCustomerBillingCycleFactory.create()
        self.test_user = AdminUserFactory.create()
        self.test_customer_group = StandardCustomerGroupFactory.create()
        self.test_customer = StandardCustomerFactory.create(
            is_member_of=(self.test_customer_group, ))
        self.test_currency = StandardCurrencyFactory.create()
        self.test_user_extension = StandardUserExtensionFactory.create(
            user=self.test_user)
        self.test_reporting_period = StandardReportingPeriodFactory.create()
        self.test_1st_task = StandardTaskFactory.create(
            title="1st Test Task", project=self.test_reporting_period.project)
        self.estimation_1st_task = StandardHumanResourceEstimationToTaskFactory(
            task=self.test_1st_task,
            date_from=start_date,
            date_until=end_date_first_task)
        self.test_2nd_task = StandardTaskFactory.create(
            title="2nd Test Task", project=self.test_reporting_period.project)
        self.estimation_2nd_task = StandardHumanResourceEstimationToTaskFactory(
            task=self.test_2nd_task,
            date_from=start_date,
            date_until=end_date_second_task)
    def setUp(self):
        datetime_now = datetime.datetime(2024, 1, 1, 0, 00)
        datetime_now = pytz.timezone("UTC").localize(datetime_now, is_dst=None)
        start_date = (datetime_now - datetime.timedelta(days=30)).date().__str__()
        end_date_first_task = (datetime_now + datetime.timedelta(days=30)).date().__str__()
        end_date_second_task = (datetime_now + datetime.timedelta(days=60)).date().__str__()

        self.test_billing_cycle = StandardCustomerBillingCycleFactory.create()
        self.test_user = AdminUserFactory.create()
        self.test_customer_group = StandardCustomerGroupFactory.create()
        self.test_customer = StandardCustomerFactory.create(is_member_of=(self.test_customer_group,))
        self.test_currency = StandardCurrencyFactory.create()
        self.test_user_extension = StandardUserExtensionFactory.create(user=self.test_user)
        self.test_reporting_period = StandardReportingPeriodFactory.create()
        self.test_1st_task = StandardTaskFactory.create(title="1st Test Task",
                                                        project=self.test_reporting_period.project,
                                                        last_status_change=datetime.date(2024, 6, 15)
                                                        )
        self.estimation_1st_task = StandardHumanResourceEstimationToTaskFactory(task=self.test_1st_task,
                                                                                date_from=start_date,
                                                                                date_until=end_date_first_task)
        self.test_2nd_task = StandardTaskFactory.create(title="2nd Test Task",
                                                        project=self.test_reporting_period.project,
                                                        last_status_change=datetime.date(2024, 6, 15))
        self.estimation_2nd_task = StandardHumanResourceEstimationToTaskFactory(task=self.test_2nd_task,
                                                                                date_from=start_date,
                                                                                date_until=end_date_second_task)
示例#5
0
    def setUp(self):

        self.test_billing_cycle = StandardCustomerBillingCycleFactory.create()
        self.test_user = AdminUserFactory.create()
        self.test_customer_group = StandardCustomerGroupFactory.create()
        self.test_customer = StandardCustomerFactory.create(is_member_of=(self.test_customer_group,))
        self.test_currency = StandardCurrencyFactory.create()
        self.test_user_extension = StandardUserExtensionFactory.create(user=self.test_user)
        self.test_reporting_period = StandardReportingPeriodFactory.create()
示例#6
0
 def setUp(self):
     firefox_options = webdriver.firefox.options.Options()
     firefox_options.set_headless(headless=True)
     self.selenium = webdriver.Firefox(firefox_options=firefox_options)
     self.test_user = AdminUserFactory.create()
     self.test_customer_group = StandardCustomerGroupFactory.create()
     self.test_customer = StandardCustomerFactory.create(is_member_of=(self.test_customer_group,))
     self.test_currency = StandardCurrencyFactory.create()
     self.test_user_extension = StandardUserExtensionFactory.create(user=self.test_user)
    def setUp(self):

        self.test_billing_cycle = StandardCustomerBillingCycleFactory.create()
        self.test_user = AdminUserFactory.create()
        self.test_customer_group = StandardCustomerGroupFactory.create()
        self.test_unit = StandardUnitFactory.create()
        self.test_customer = StandardCustomerFactory.create(is_member_of=(self.test_customer_group,))
        self.test_currency = StandardCurrencyFactory.create()
        self.test_user_extension = StandardUserExtensionFactory.create(user=self.test_user)
        self.test_project = StandardProjectFactory.create()
        self.test_human_resource = StandardHumanResourceFactory.create()
示例#8
0
 def setUp(self):
     firefox_options = webdriver.firefox.options.Options()
     firefox_options.set_headless(headless=True)
     self.selenium = webdriver.Firefox(firefox_options=firefox_options)
     self.test_user = AdminUserFactory.create()
     self.test_customer_group = StandardCustomerGroupFactory.create()
     self.test_customer = StandardCustomerFactory.create(is_member_of=(self.test_customer_group,))
     self.test_currency = StandardCurrencyFactory.create()
     self.test_user_extension = StandardUserExtensionFactory.create(user=self.test_user)
     self.test_customer_group = StandardCustomerGroupFactory.create()
     self.test_customer = StandardCustomerFactory.create(is_member_of=(self.test_customer_group,))
     self.test_currency = StandardCurrencyFactory.create()
     self.test_reporting_period = StandardReportingPeriodFactory.create()
     self.test_1st_task = StandardTaskFactory.create(title="1st Test Task",
                                                     project=self.test_reporting_period.project,
                                                     )
 def setUp(self):
     firefox_options = webdriver.firefox.options.Options()
     firefox_options.set_headless(headless=True)
     self.selenium = webdriver.Firefox(firefox_options=firefox_options)
     self.test_user = AdminUserFactory.create()
     self.test_customer_group = StandardCustomerGroupFactory.create()
     self.test_customer = StandardCustomerFactory.create(is_member_of=(self.test_customer_group,))
     self.test_currency = StandardCurrencyFactory.create()
     self.test_user_extension = StandardUserExtensionFactory.create(user=self.test_user)
     self.test_human_resource = StandardHumanResourceFactory.create(user=self.test_user_extension)
     self.test_customer_group = StandardCustomerGroupFactory.create()
     self.test_customer = StandardCustomerFactory.create(is_member_of=(self.test_customer_group,))
     self.test_currency = StandardCurrencyFactory.create()
     self.test_reporting_period = StandardReportingPeriodFactory.create()
     self.test_1st_task = StandardTaskFactory.create(title="1st Test Task",
                                                     project=self.test_reporting_period.project,
                                                     )