Exemplo n.º 1
0
    def test_default_table_names(self):
        ws = Workspace(self.client, self.db_client, self.config)

        self.assertEqual(ws.projects_table_name(),
                         workspace.PROJECTS_TABLE_NAME)
        self.assertEqual(ws.project_memberships_table_name(),
                         workspace.PROJECT_MEMBERSHIPS_TABLE_NAME)
        self.assertEqual(ws.users_table_name(), workspace.USERS_TABLE_NAME)
        self.assertEqual(ws.followers_table_name(),
                         workspace.FOLLOWERS_TABLE_NAME)
        self.assertEqual(ws.custom_fields_table_name(),
                         workspace.CUSTOM_FIELDS_TABLE_NAME)
        self.assertEqual(ws.custom_field_enum_values_table_name(),
                         workspace.CUSTOM_FIELD_ENUM_VALUES_TABLE_NAME)
        self.assertEqual(ws.custom_field_values_table_name(),
                         workspace.CUSTOM_FIELD_VALUES_TABLE_NAME)
Exemplo n.º 2
0
    def test_custom_table_name(self):
        self.config.projects_table_name = "custom projects"
        self.config.project_memberships_table_name = "custom project_memberships"
        self.config.users_table_name = "custom users"
        self.config.followers_table_name = "custom followers"
        self.config.custom_fields_table_name = "custom custom_fields"
        self.config.custom_field_enum_values_table_name = "custom custom_field_enum_values"
        self.config.custom_field_values_table_name = "custom custom_field_values"
        ws = Workspace(self.client, self.db_client, self.config)

        self.assertEqual(ws.projects_table_name(), "custom projects")
        self.assertEqual(ws.project_memberships_table_name(),
                         "custom project_memberships")
        self.assertEqual(ws.users_table_name(), "custom users")
        self.assertEqual(ws.followers_table_name(), "custom followers")
        self.assertEqual(ws.custom_fields_table_name(), "custom custom_fields")
        self.assertEqual(ws.custom_field_enum_values_table_name(),
                         "custom custom_field_enum_values")
        self.assertEqual(ws.custom_field_values_table_name(),
                         "custom custom_field_values")